// Made with Amplify Shader Editor // Available at the Unity Asset Store - http://u3d.as/y3X Shader "Vefects/SH_Vefects_VFX_Heat_Haze" { Properties { [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5 [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1) [ASEBegin]_Texture("Texture", 2D) = "white" {} _DistortionTexture("Distortion Texture", 2D) = "white" {} _TextureChannel("Texture Channel", Vector) = (0,1,0,0) _ExtraNoiseLerp("Extra Noise Lerp", Float) = 1 _DistortionStrength("Distortion Strength", Float) = 7 _DissolveMask("Dissolve Mask", 2D) = "white" {} [ASEEnd]_CameraOffset("Camera Offset", Float) = -40 [HideInInspector] _texcoord( "", 2D ) = "white" {} [HideInInspector]_RenderQueueType("Render Queue Type", Float) = 5 [HideInInspector][ToggleUI]_AddPrecomputedVelocity("Add Precomputed Velocity", Float) = 1 //[HideInInspector]_ShadowMatteFilter("Shadow Matte Filter", Float) = 2 [HideInInspector]_StencilRef("Stencil Ref", Int) = 0 [HideInInspector]_StencilWriteMask("StencilWrite Mask", Int) = 6 [HideInInspector]_StencilRefDepth("StencilRefDepth", Int) = 0 [HideInInspector]_StencilWriteMaskDepth("_StencilWriteMaskDepth", Int) = 8 [HideInInspector]_StencilRefMV("_StencilRefMV", Int) = 32 [HideInInspector]_StencilWriteMaskMV("_StencilWriteMaskMV", Int) = 40 [HideInInspector]_StencilRefDistortionVec("_StencilRefDistortionVec", Int) = 4 [HideInInspector]_StencilWriteMaskDistortionVec("_StencilWriteMaskDistortionVec", Int) = 4 [HideInInspector]_StencilWriteMaskGBuffer("_StencilWriteMaskGBuffer", Int) = 14 [HideInInspector]_StencilRefGBuffer("_StencilRefGBuffer", Int) = 2 [HideInInspector]_ZTestGBuffer("_ZTestGBuffer", Int) = 4 [HideInInspector][ToggleUI]_RequireSplitLighting("_RequireSplitLighting", Float) = 0 [HideInInspector][ToggleUI]_ReceivesSSR("_ReceivesSSR", Float) = 0 [HideInInspector]_SurfaceType("_SurfaceType", Float) = 1 [HideInInspector]_BlendMode("_BlendMode", Float) = 0 [HideInInspector]_SrcBlend("_SrcBlend", Float) = 1 [HideInInspector]_DstBlend("_DstBlend", Float) = 0 [HideInInspector]_AlphaSrcBlend("Vec_AlphaSrcBlendtor1", Float) = 1 [HideInInspector]_AlphaDstBlend("_AlphaDstBlend", Float) = 0 [HideInInspector][ToggleUI]_ZWrite("_ZWrite", Float) = 1 [HideInInspector][ToggleUI]_TransparentZWrite("_TransparentZWrite", Float) = 1 [HideInInspector]_CullMode("Cull Mode", Float) = 2 [HideInInspector]_TransparentSortPriority("_TransparentSortPriority", Int) = 0 [HideInInspector][ToggleUI]_EnableFogOnTransparent("_EnableFogOnTransparent", Float) = 1 [HideInInspector]_CullModeForward("_CullModeForward", Float) = 2 [HideInInspector][Enum(Front, 1, Back, 2)]_TransparentCullMode("_TransparentCullMode", Float) = 2 [HideInInspector]_ZTestDepthEqualForOpaque("_ZTestDepthEqualForOpaque", Int) = 4 [HideInInspector][Enum(UnityEngine.Rendering.CompareFunction)]_ZTestTransparent("_ZTestTransparent", Float) = 4 [HideInInspector][ToggleUI]_TransparentBackfaceEnable("_TransparentBackfaceEnable", Float) = 0 [HideInInspector][ToggleUI]_AlphaCutoffEnable("_AlphaCutoffEnable", Float) = 0 [HideInInspector][ToggleUI]_UseShadowThreshold("_UseShadowThreshold", Float) = 0 [HideInInspector][ToggleUI]_DoubleSidedEnable("_DoubleSidedEnable", Float) = 0 [HideInInspector][Enum(Flip, 0, Mirror, 1, None, 2)]_DoubleSidedNormalMode("_DoubleSidedNormalMode", Float) = 2 [HideInInspector]_DoubleSidedConstants("_DoubleSidedConstants", Vector) = (1, 1, -1, 0) [HideInInspector]_DistortionEnable("_DistortionEnable",Float) = 0 [HideInInspector]_DistortionOnly("_DistortionOnly",Float) = 0 //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5 //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16 //_TessMin( "Tess Min Distance", Float ) = 10 //_TessMax( "Tess Max Distance", Float ) = 25 //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16 //_TessMaxDisp( "Tess Max Displacement", Float ) = 25 } SubShader { LOD 0 Tags { "RenderPipeline"="HDRenderPipeline" "RenderType"="Transparent" "Queue"="Transparent" } HLSLINCLUDE #pragma target 4.5 #pragma only_renderers d3d11 metal vulkan xboxone xboxseries playstation switch #pragma instancing_options renderinglayer #ifndef ASE_TESS_FUNCS #define ASE_TESS_FUNCS float4 FixedTess( float tessValue ) { return tessValue; } float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos ) { float3 wpos = mul(o2w,vertex).xyz; float dist = distance (wpos, cameraPos); float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess; return f; } float4 CalcTriEdgeTessFactors (float3 triVertexFactors) { float4 tess; tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z); tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z); tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y); tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f; return tess; } float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams ) { float dist = distance (0.5 * (wpos0+wpos1), cameraPos); float len = distance(wpos0, wpos1); float f = max(len * scParams.y / (edgeLen * dist), 1.0); return f; } float DistanceFromPlaneASE (float3 pos, float4 plane) { return dot (float4(pos,1.0f), plane); } bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] ) { float4 planeTest; planeTest.x = (( DistanceFromPlaneASE(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlaneASE(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlaneASE(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f ); planeTest.y = (( DistanceFromPlaneASE(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlaneASE(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlaneASE(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f ); planeTest.z = (( DistanceFromPlaneASE(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlaneASE(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlaneASE(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f ); planeTest.w = (( DistanceFromPlaneASE(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlaneASE(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlaneASE(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f ); return !all (planeTest); } float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos ) { float3 f; f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos); f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos); f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos); return CalcTriEdgeTessFactors (f); } float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams ) { float3 pos0 = mul(o2w,v0).xyz; float3 pos1 = mul(o2w,v1).xyz; float3 pos2 = mul(o2w,v2).xyz; float4 tess; tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); tess.w = (tess.x + tess.y + tess.z) / 3.0f; return tess; } float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] ) { float3 pos0 = mul(o2w,v0).xyz; float3 pos1 = mul(o2w,v1).xyz; float3 pos2 = mul(o2w,v2).xyz; float4 tess; if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes)) { tess = 0.0f; } else { tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); tess.w = (tess.x + tess.y + tess.z) / 3.0f; } return tess; } #endif //ASE_TESS_FUNCS ENDHLSL Pass { Name "Forward Unlit" Tags { "LightMode"="ForwardOnly" } Blend [_SrcBlend] [_DstBlend], [_AlphaSrcBlend] [_AlphaDstBlend] Cull [_CullMode] ZTest [_ZTestTransparent] ZWrite [_ZWrite] Stencil { Ref [_StencilRef] WriteMask [_StencilWriteMask] Comp Always Pass Replace Fail Keep ZFail Keep } HLSLPROGRAM #pragma multi_compile_instancing #define HAVE_MESH_MODIFICATION 1 #define ASE_SRP_VERSION 100501 #define REQUIRE_OPAQUE_TEXTURE 1 #define SHADERPASS SHADERPASS_FORWARD_UNLIT #pragma multi_compile _ DEBUG_DISPLAY #pragma shader_feature _SURFACE_TYPE_TRANSPARENT #pragma shader_feature_local _ _BLENDMODE_ALPHA _BLENDMODE_ADD _BLENDMODE_PRE_MULTIPLY #pragma shader_feature_local _ALPHATEST_ON #pragma shader_feature_local _ENABLE_FOG_ON_TRANSPARENT #pragma vertex Vert #pragma fragment Frag #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphHeader.hlsl" #if defined(_ENABLE_SHADOW_MATTE) && SHADERPASS == SHADERPASS_FORWARD_UNLIT #define LIGHTLOOP_DISABLE_TILE_AND_CLUSTER #define HAS_LIGHTLOOP #define SHADOW_OPTIMIZE_REGISTER_USAGE 1 #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonLighting.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowContext.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/HDShadow.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoopDef.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/PunctualLightCommon.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/HDShadowLoop.hlsl" #endif #define ASE_NEEDS_VERT_POSITION #define ASE_NEEDS_FRAG_COLOR struct VertexInput { float3 positionOS : POSITION; float3 normalOS : NORMAL; float4 ase_texcoord3 : TEXCOORD3; float4 ase_texcoord : TEXCOORD0; float4 ase_color : COLOR; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float4 positionCS : SV_Position; float3 positionRWS : TEXCOORD0; float4 ase_texcoord1 : TEXCOORD1; float4 ase_color : COLOR; float4 ase_texcoord2 : TEXCOORD2; float4 ase_texcoord3 : TEXCOORD3; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START( UnityPerMaterial ) float4 _DistortionTexture_ST; float4 _Texture_ST; float4 _TextureChannel; float4 _DissolveMask_ST; float _CameraOffset; float _ExtraNoiseLerp; float _DistortionStrength; float4 _EmissionColor; float _RenderQueueType; #ifdef _ADD_PRECOMPUTED_VELOCITY float _AddPrecomputedVelocity; #endif #ifdef _ENABLE_SHADOW_MATTE float _ShadowMatteFilter; #endif float _StencilRef; float _StencilWriteMask; float _StencilRefDepth; float _StencilWriteMaskDepth; float _StencilRefMV; float _StencilWriteMaskMV; float _StencilRefDistortionVec; float _StencilWriteMaskDistortionVec; float _StencilWriteMaskGBuffer; float _StencilRefGBuffer; float _ZTestGBuffer; float _RequireSplitLighting; float _ReceivesSSR; float _SurfaceType; float _BlendMode; float _SrcBlend; float _DstBlend; float _AlphaSrcBlend; float _AlphaDstBlend; float _ZWrite; float _TransparentZWrite; float _CullMode; float _TransparentSortPriority; float _EnableFogOnTransparent; float _CullModeForward; float _TransparentCullMode; float _ZTestDepthEqualForOpaque; float _ZTestTransparent; float _TransparentBackfaceEnable; float _AlphaCutoffEnable; float _AlphaCutoff; float _UseShadowThreshold; float _DoubleSidedEnable; float _DoubleSidedNormalMode; float4 _DoubleSidedConstants; #ifdef TESSELLATION_ON float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END sampler2D _DistortionTexture; sampler2D _Texture; sampler2D _DissolveMask; #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl" float4 ASEHDSampleSceneColor(float2 uv, float lod, float exposureMultiplier) { #if defined(REQUIRE_OPAQUE_TEXTURE) && defined(_SURFACE_TYPE_TRANSPARENT) && defined(SHADERPASS) && (SHADERPASS != SHADERPASS_LIGHT_TRANSPORT) return float4( SampleCameraColor(uv, lod) * exposureMultiplier, 1.0 ); #endif return float4(0.0, 0.0, 0.0, 1.0); } struct SurfaceDescription { float3 Color; float3 Emission; float4 ShadowTint; float Alpha; float AlphaClipThreshold; }; void BuildSurfaceData(FragInputs fragInputs, SurfaceDescription surfaceDescription, float3 V, out SurfaceData surfaceData) { ZERO_INITIALIZE(SurfaceData, surfaceData); surfaceData.color = surfaceDescription.Color; } void GetSurfaceAndBuiltinData(SurfaceDescription surfaceDescription , FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData) { #if _ALPHATEST_ON DoAlphaTest ( surfaceDescription.Alpha, surfaceDescription.AlphaClipThreshold ); #endif BuildSurfaceData(fragInputs, surfaceDescription, V, surfaceData); #if defined(_ENABLE_SHADOW_MATTE) && SHADERPASS == SHADERPASS_FORWARD_UNLIT HDShadowContext shadowContext = InitShadowContext(); float shadow; float3 shadow3; posInput = GetPositionInput(fragInputs.positionSS.xy, _ScreenSize.zw, fragInputs.positionSS.z, UNITY_MATRIX_I_VP, UNITY_MATRIX_V); float3 normalWS = normalize(fragInputs.tangentToWorld[1]); uint renderingLayers = _EnableLightLayers ? asuint(unity_RenderingLayer.x) : DEFAULT_LIGHT_LAYERS; ShadowLoopMin(shadowContext, posInput, normalWS, asuint(_ShadowMatteFilter), renderingLayers, shadow3); shadow = dot(shadow3, float3(1.0f/3.0f, 1.0f/3.0f, 1.0f/3.0f)); float4 shadowColor = (1 - shadow)*surfaceDescription.ShadowTint.rgba; float localAlpha = saturate(shadowColor.a + surfaceDescription.Alpha); #ifdef _SURFACE_TYPE_TRANSPARENT surfaceData.color = lerp(shadowColor.rgb*surfaceData.color, lerp(lerp(shadowColor.rgb, surfaceData.color, 1 - surfaceDescription.ShadowTint.a), surfaceData.color, shadow), surfaceDescription.Alpha); #else surfaceData.color = lerp(lerp(shadowColor.rgb, surfaceData.color, 1 - surfaceDescription.ShadowTint.a), surfaceData.color, shadow); #endif localAlpha = ApplyBlendMode(surfaceData.color, localAlpha).a; surfaceDescription.Alpha = localAlpha; #endif ZERO_INITIALIZE(BuiltinData, builtinData); builtinData.opacity = surfaceDescription.Alpha; builtinData.emissiveColor = surfaceDescription.Emission; } VertexOutput VertexFunction( VertexInput inputMesh ) { VertexOutput o; UNITY_SETUP_INSTANCE_ID(inputMesh); UNITY_TRANSFER_INSTANCE_ID(inputMesh, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o ); float3 ase_worldPos = GetAbsolutePositionWS( TransformObjectToWorld( (inputMesh.positionOS).xyz ) ); float2 texCoord185 = inputMesh.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 ); float3 objectToViewPos = TransformWorldToView(TransformObjectToWorld(inputMesh.positionOS)); float eyeDepth = -objectToViewPos.z; o.ase_texcoord2.x = eyeDepth; float4 ase_clipPos = TransformWorldToHClip( TransformObjectToWorld(inputMesh.positionOS)); float4 screenPos = ComputeScreenPos( ase_clipPos , _ProjectionParams.x ); o.ase_texcoord3 = screenPos; o.ase_texcoord1 = inputMesh.ase_texcoord; o.ase_color = inputMesh.ase_color; //setting value to unused interpolator channels and avoid initialization warnings o.ase_texcoord2.yzw = 0; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = inputMesh.positionOS.xyz; #else float3 defaultVertexValue = float3( 0, 0, 0 ); #endif float3 vertexValue = ( ( ase_worldPos - _WorldSpaceCameraPos ) * ( ( _CameraOffset + texCoord185.y ) * 0.01 ) ); #ifdef ASE_ABSOLUTE_VERTEX_POS inputMesh.positionOS.xyz = vertexValue; #else inputMesh.positionOS.xyz += vertexValue; #endif inputMesh.normalOS = inputMesh.normalOS; float3 positionRWS = TransformObjectToWorld(inputMesh.positionOS); o.positionCS = TransformWorldToHClip(positionRWS); o.positionRWS = positionRWS; return o; } #if defined(TESSELLATION_ON) struct VertexControl { float3 positionOS : INTERNALTESSPOS; float3 normalOS : NORMAL; float4 ase_texcoord3 : TEXCOORD3; float4 ase_texcoord : TEXCOORD0; float4 ase_color : COLOR; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl Vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.positionOS = v.positionOS; o.normalOS = v.normalOS; o.ase_texcoord3 = v.ase_texcoord3; o.ase_texcoord = v.ase_texcoord; o.ase_color = v.ase_color; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if (SHADEROPTIONS_CAMERA_RELATIVE_RENDERING != 0) float3 cameraPos = 0; #else float3 cameraPos = _WorldSpaceCameraPos; #endif #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(float4(v[0].positionOS,1), float4(v[1].positionOS,1), float4(v[2].positionOS,1), tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), cameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(float4(v[0].positionOS,1), float4(v[1].positionOS,1), float4(v[2].positionOS,1), edgeLength, GetObjectToWorldMatrix(), cameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(float4(v[0].positionOS,1), float4(v[1].positionOS,1), float4(v[2].positionOS,1), edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), cameraPos, _ScreenParams, _FrustumPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [domain("tri")] [partitioning("fractional_odd")] [outputtopology("triangle_cw")] [patchconstantfunc("TessellationFunction")] [outputcontrolpoints(3)] VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) { return patch[id]; } [domain("tri")] VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { VertexInput o = (VertexInput) 0; o.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; o.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; o.ase_texcoord3 = patch[0].ase_texcoord3 * bary.x + patch[1].ase_texcoord3 * bary.y + patch[2].ase_texcoord3 * bary.z; o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.positionOS.xyz - patch[i].normalOS * (dot(o.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); float phongStrength = _TessPhongStrength; o.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.positionOS.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else VertexOutput Vert ( VertexInput v ) { return VertexFunction( v ); } #endif float4 Frag( VertexOutput packedInput ) : SV_Target { UNITY_SETUP_INSTANCE_ID( packedInput ); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( packedInput ); FragInputs input; ZERO_INITIALIZE(FragInputs, input); input.tangentToWorld = k_identity3x3; float3 positionRWS = packedInput.positionRWS; input.positionSS = packedInput.positionCS; input.positionRWS = positionRWS; PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, input.positionSS.z, input.positionSS.w, input.positionRWS); float3 V = GetWorldSpaceNormalizeViewDir( input.positionRWS ); SurfaceDescription surfaceDescription = (SurfaceDescription)0; float3 temp_cast_0 = (0.0).xxx; float2 uv_DistortionTexture = packedInput.ase_texcoord1.xy * _DistortionTexture_ST.xy + _DistortionTexture_ST.zw; float2 lerpResult390 = lerp( float2( 0,0 ) , (tex2D( _DistortionTexture, uv_DistortionTexture )).rg , _ExtraNoiseLerp); float3 appendResult396 = (float3(lerpResult390 , 1.0)); float2 uv_Texture = packedInput.ase_texcoord1.xy * _Texture_ST.xy + _Texture_ST.zw; float dotResult290 = dot( tex2D( _Texture, uv_Texture ) , _TextureChannel ); float2 uv_DissolveMask = packedInput.ase_texcoord1.xy * _DissolveMask_ST.xy + _DissolveMask_ST.zw; float4 texCoord289 = packedInput.ase_texcoord1; texCoord289.xy = packedInput.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 ); float4 temp_output_356_0 = ( packedInput.ase_color.a * ( saturate( dotResult290 ) * ( saturate( tex2D( _DissolveMask, uv_DissolveMask ) ) + texCoord289.z ) ) ); float eyeDepth = packedInput.ase_texcoord2.x; float4 screenPos = packedInput.ase_texcoord3; float4 ase_screenPosNorm = screenPos / screenPos.w; ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; float eyeDepth28_g1 = LinearEyeDepth(SampleCameraDepth( ase_screenPosNorm.xy ),_ZBufferParams); float2 temp_output_20_0_g1 = ( (appendResult396).xy * ( ( temp_output_356_0 * _DistortionStrength ).r / max( eyeDepth , 0.1 ) ) * saturate( ( eyeDepth28_g1 - eyeDepth ) ) ); float eyeDepth2_g1 = LinearEyeDepth(SampleCameraDepth( ( float4( temp_output_20_0_g1, 0.0 , 0.0 ) + ase_screenPosNorm ).xy ),_ZBufferParams); float2 temp_output_32_0_g1 = (( float4( ( temp_output_20_0_g1 * saturate( ( eyeDepth2_g1 - eyeDepth ) ) ), 0.0 , 0.0 ) + ase_screenPosNorm )).xy; float4 fetchOpaqueVal394 = ASEHDSampleSceneColor(temp_output_32_0_g1, 0.0, GetInverseCurrentExposureMultiplier()); surfaceDescription.Color = temp_cast_0; surfaceDescription.Emission = (fetchOpaqueVal394).rgb; surfaceDescription.Alpha = saturate( temp_output_356_0 ).r; surfaceDescription.AlphaClipThreshold = _AlphaCutoff; surfaceDescription.ShadowTint = float4( 0, 0 ,0 ,1 ); float2 Distortion = float2 ( 0, 0 ); float DistortionBlur = 0; SurfaceData surfaceData; BuiltinData builtinData; GetSurfaceAndBuiltinData(surfaceDescription, input, V, posInput, surfaceData, builtinData); BSDFData bsdfData = ConvertSurfaceDataToBSDFData( input.positionSS.xy, surfaceData ); float4 outColor = ApplyBlendMode( bsdfData.color + builtinData.emissiveColor * GetCurrentExposureMultiplier(), builtinData.opacity ); outColor = EvaluateAtmosphericScattering( posInput, V, outColor ); #ifdef DEBUG_DISPLAY int bufferSize = int(_DebugViewMaterialArray[0].x); for (int index = 1; index <= bufferSize; index++) { int indexMaterialProperty = int(_DebugViewMaterialArray[index].x); if (indexMaterialProperty != 0) { float3 result = float3(1.0, 0.0, 1.0); bool needLinearToSRGB = false; GetPropertiesDataDebug(indexMaterialProperty, result, needLinearToSRGB); GetVaryingsDataDebug(indexMaterialProperty, input, result, needLinearToSRGB); GetBuiltinDataDebug(indexMaterialProperty, builtinData, posInput, result, needLinearToSRGB); GetSurfaceDataDebug(indexMaterialProperty, surfaceData, result, needLinearToSRGB); GetBSDFDataDebug(indexMaterialProperty, bsdfData, result, needLinearToSRGB); if (!needLinearToSRGB) result = SRGBToLinear(max(0, result)); outColor = float4(result, 1.0); } } if (_DebugFullScreenMode == FULLSCREENDEBUGMODE_TRANSPARENCY_OVERDRAW) { float4 result = _DebugTransparencyOverdrawWeight * float4(TRANSPARENCY_OVERDRAW_COST, TRANSPARENCY_OVERDRAW_COST, TRANSPARENCY_OVERDRAW_COST, TRANSPARENCY_OVERDRAW_A); outColor = result; } #endif return outColor; } ENDHLSL } Pass { Name "ShadowCaster" Tags { "LightMode"="ShadowCaster" } Cull [_CullMode] ZWrite On ZClip [_ZClip] ColorMask 0 HLSLPROGRAM #pragma multi_compile_instancing #define HAVE_MESH_MODIFICATION 1 #define ASE_SRP_VERSION 100501 #define SHADERPASS SHADERPASS_SHADOWS #pragma shader_feature _SURFACE_TYPE_TRANSPARENT #pragma shader_feature_local _ _BLENDMODE_ALPHA _BLENDMODE_ADD _BLENDMODE_PRE_MULTIPLY #pragma shader_feature_local _ALPHATEST_ON #pragma shader_feature_local _ENABLE_FOG_ON_TRANSPARENT #pragma vertex Vert #pragma fragment Frag #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphHeader.hlsl" struct VertexInput { float3 positionOS : POSITION; float3 normalOS : NORMAL; float4 ase_texcoord3 : TEXCOORD3; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float4 positionCS : SV_Position; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START( UnityPerMaterial ) float4 _DistortionTexture_ST; float4 _Texture_ST; float4 _TextureChannel; float4 _DissolveMask_ST; float _CameraOffset; float _ExtraNoiseLerp; float _DistortionStrength; float4 _EmissionColor; float _RenderQueueType; #ifdef _ADD_PRECOMPUTED_VELOCITY float _AddPrecomputedVelocity; #endif #ifdef _ENABLE_SHADOW_MATTE float _ShadowMatteFilter; #endif float _StencilRef; float _StencilWriteMask; float _StencilRefDepth; float _StencilWriteMaskDepth; float _StencilRefMV; float _StencilWriteMaskMV; float _StencilRefDistortionVec; float _StencilWriteMaskDistortionVec; float _StencilWriteMaskGBuffer; float _StencilRefGBuffer; float _ZTestGBuffer; float _RequireSplitLighting; float _ReceivesSSR; float _SurfaceType; float _BlendMode; float _SrcBlend; float _DstBlend; float _AlphaSrcBlend; float _AlphaDstBlend; float _ZWrite; float _TransparentZWrite; float _CullMode; float _TransparentSortPriority; float _EnableFogOnTransparent; float _CullModeForward; float _TransparentCullMode; float _ZTestDepthEqualForOpaque; float _ZTestTransparent; float _TransparentBackfaceEnable; float _AlphaCutoffEnable; float _AlphaCutoff; float _UseShadowThreshold; float _DoubleSidedEnable; float _DoubleSidedNormalMode; float4 _DoubleSidedConstants; #ifdef TESSELLATION_ON float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END sampler2D _Texture; sampler2D _DissolveMask; #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl" struct SurfaceDescription { float Alpha; float AlphaClipThreshold; }; void BuildSurfaceData(FragInputs fragInputs, SurfaceDescription surfaceDescription, float3 V, out SurfaceData surfaceData) { ZERO_INITIALIZE(SurfaceData, surfaceData); } void GetSurfaceAndBuiltinData(SurfaceDescription surfaceDescription, FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData) { #if _ALPHATEST_ON DoAlphaTest(surfaceDescription.Alpha, surfaceDescription.AlphaClipThreshold); #endif BuildSurfaceData(fragInputs, surfaceDescription, V, surfaceData); ZERO_INITIALIZE (BuiltinData, builtinData); builtinData.opacity = surfaceDescription.Alpha; } VertexOutput VertexFunction( VertexInput inputMesh ) { VertexOutput o; UNITY_SETUP_INSTANCE_ID(inputMesh); UNITY_TRANSFER_INSTANCE_ID(inputMesh, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o ); float3 ase_worldPos = GetAbsolutePositionWS( TransformObjectToWorld( (inputMesh.positionOS).xyz ) ); float2 texCoord185 = inputMesh.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 ); o.ase_color = inputMesh.ase_color; o.ase_texcoord = inputMesh.ase_texcoord; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = inputMesh.positionOS.xyz; #else float3 defaultVertexValue = float3( 0, 0, 0 ); #endif float3 vertexValue = ( ( ase_worldPos - _WorldSpaceCameraPos ) * ( ( _CameraOffset + texCoord185.y ) * 0.01 ) ); #ifdef ASE_ABSOLUTE_VERTEX_POS inputMesh.positionOS.xyz = vertexValue; #else inputMesh.positionOS.xyz += vertexValue; #endif inputMesh.normalOS = inputMesh.normalOS ; float3 positionRWS = TransformObjectToWorld(inputMesh.positionOS); o.positionCS = TransformWorldToHClip(positionRWS); return o; } #if defined(TESSELLATION_ON) struct VertexControl { float3 positionOS : INTERNALTESSPOS; float3 normalOS : NORMAL; float4 ase_texcoord3 : TEXCOORD3; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl Vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.positionOS = v.positionOS; o.normalOS = v.normalOS; o.ase_texcoord3 = v.ase_texcoord3; o.ase_color = v.ase_color; o.ase_texcoord = v.ase_texcoord; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if (SHADEROPTIONS_CAMERA_RELATIVE_RENDERING != 0) float3 cameraPos = 0; #else float3 cameraPos = _WorldSpaceCameraPos; #endif #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(float4(v[0].positionOS,1), float4(v[1].positionOS,1), float4(v[2].positionOS,1), tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), cameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(float4(v[0].positionOS,1), float4(v[1].positionOS,1), float4(v[2].positionOS,1), edgeLength, GetObjectToWorldMatrix(), cameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(float4(v[0].positionOS,1), float4(v[1].positionOS,1), float4(v[2].positionOS,1), edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), cameraPos, _ScreenParams, _FrustumPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [domain("tri")] [partitioning("fractional_odd")] [outputtopology("triangle_cw")] [patchconstantfunc("TessellationFunction")] [outputcontrolpoints(3)] VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) { return patch[id]; } [domain("tri")] VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { VertexInput o = (VertexInput) 0; o.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; o.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; o.ase_texcoord3 = patch[0].ase_texcoord3 * bary.x + patch[1].ase_texcoord3 * bary.y + patch[2].ase_texcoord3 * bary.z; o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.positionOS.xyz - patch[i].normalOS * (dot(o.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); float phongStrength = _TessPhongStrength; o.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.positionOS.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else VertexOutput Vert ( VertexInput v ) { return VertexFunction( v ); } #endif void Frag( VertexOutput packedInput #ifdef WRITE_NORMAL_BUFFER , out float4 outNormalBuffer : SV_Target0 #ifdef WRITE_MSAA_DEPTH , out float1 depthColor : SV_Target1 #endif #elif defined(WRITE_MSAA_DEPTH) , out float4 outNormalBuffer : SV_Target0 , out float1 depthColor : SV_Target1 #elif defined(SCENESELECTIONPASS) , out float4 outColor : SV_Target0 #endif #ifdef _DEPTHOFFSET_ON , out float outputDepth : SV_Depth #endif ) { UNITY_SETUP_INSTANCE_ID( packedInput ); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( packedInput ); FragInputs input; ZERO_INITIALIZE(FragInputs, input); input.tangentToWorld = k_identity3x3; input.positionSS = packedInput.positionCS; PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, input.positionSS.z, input.positionSS.w, input.positionRWS); float3 V = float3( 1.0, 1.0, 1.0 ); SurfaceDescription surfaceDescription = (SurfaceDescription)0; float2 uv_Texture = packedInput.ase_texcoord.xy * _Texture_ST.xy + _Texture_ST.zw; float dotResult290 = dot( tex2D( _Texture, uv_Texture ) , _TextureChannel ); float2 uv_DissolveMask = packedInput.ase_texcoord.xy * _DissolveMask_ST.xy + _DissolveMask_ST.zw; float4 texCoord289 = packedInput.ase_texcoord; texCoord289.xy = packedInput.ase_texcoord.xy * float2( 1,1 ) + float2( 0,0 ); float4 temp_output_356_0 = ( packedInput.ase_color.a * ( saturate( dotResult290 ) * ( saturate( tex2D( _DissolveMask, uv_DissolveMask ) ) + texCoord289.z ) ) ); surfaceDescription.Alpha = saturate( temp_output_356_0 ).r; surfaceDescription.AlphaClipThreshold = _AlphaCutoff; SurfaceData surfaceData; BuiltinData builtinData; GetSurfaceAndBuiltinData(surfaceDescription,input, V, posInput, surfaceData, builtinData); #ifdef _DEPTHOFFSET_ON outputDepth = posInput.deviceDepth; #endif #ifdef WRITE_NORMAL_BUFFER EncodeIntoNormalBuffer( ConvertSurfaceDataToNormalData( surfaceData ), posInput.positionSS, outNormalBuffer ); #ifdef WRITE_MSAA_DEPTH depthColor = packedInput.positionCS.z; #endif #elif defined(WRITE_MSAA_DEPTH) outNormalBuffer = float4( 0.0, 0.0, 0.0, 1.0 ); depthColor = packedInput.positionCS.z; #elif defined(SCENESELECTIONPASS) outColor = float4( _ObjectId, _PassValue, 1.0, 1.0 ); #endif } ENDHLSL } Pass { Name "META" Tags { "LightMode"="Meta" } Cull Off HLSLPROGRAM #pragma multi_compile_instancing #define HAVE_MESH_MODIFICATION 1 #define ASE_SRP_VERSION 100501 #define REQUIRE_OPAQUE_TEXTURE 1 #define SHADERPASS SHADERPASS_LIGHT_TRANSPORT #pragma shader_feature _SURFACE_TYPE_TRANSPARENT #pragma shader_feature_local _ _BLENDMODE_ALPHA _BLENDMODE_ADD _BLENDMODE_PRE_MULTIPLY #pragma shader_feature_local _ALPHATEST_ON #pragma shader_feature_local _ENABLE_FOG_ON_TRANSPARENT #pragma vertex Vert #pragma fragment Frag #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphHeader.hlsl" CBUFFER_START( UnityPerMaterial ) float4 _DistortionTexture_ST; float4 _Texture_ST; float4 _TextureChannel; float4 _DissolveMask_ST; float _CameraOffset; float _ExtraNoiseLerp; float _DistortionStrength; float4 _EmissionColor; float _RenderQueueType; #ifdef _ADD_PRECOMPUTED_VELOCITY float _AddPrecomputedVelocity; #endif #ifdef _ENABLE_SHADOW_MATTE float _ShadowMatteFilter; #endif float _StencilRef; float _StencilWriteMask; float _StencilRefDepth; float _StencilWriteMaskDepth; float _StencilRefMV; float _StencilWriteMaskMV; float _StencilRefDistortionVec; float _StencilWriteMaskDistortionVec; float _StencilWriteMaskGBuffer; float _StencilRefGBuffer; float _ZTestGBuffer; float _RequireSplitLighting; float _ReceivesSSR; float _SurfaceType; float _BlendMode; float _SrcBlend; float _DstBlend; float _AlphaSrcBlend; float _AlphaDstBlend; float _ZWrite; float _TransparentZWrite; float _CullMode; float _TransparentSortPriority; float _EnableFogOnTransparent; float _CullModeForward; float _TransparentCullMode; float _ZTestDepthEqualForOpaque; float _ZTestTransparent; float _TransparentBackfaceEnable; float _AlphaCutoffEnable; float _AlphaCutoff; float _UseShadowThreshold; float _DoubleSidedEnable; float _DoubleSidedNormalMode; float4 _DoubleSidedConstants; #ifdef TESSELLATION_ON float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END CBUFFER_START( UnityMetaPass ) bool4 unity_MetaVertexControl; bool4 unity_MetaFragmentControl; CBUFFER_END float unity_OneOverOutputBoost; float unity_MaxOutputValue; sampler2D _DistortionTexture; sampler2D _Texture; sampler2D _DissolveMask; #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl" #define ASE_NEEDS_VERT_POSITION #define ASE_NEEDS_FRAG_COLOR struct VertexInput { float3 positionOS : POSITION; float3 normalOS : NORMAL; float4 uv1 : TEXCOORD1; float4 uv2 : TEXCOORD2; float4 ase_texcoord3 : TEXCOORD3; float4 ase_texcoord : TEXCOORD0; float4 ase_color : COLOR; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float4 positionCS : SV_Position; float4 ase_texcoord : TEXCOORD0; float4 ase_color : COLOR; float4 ase_texcoord1 : TEXCOORD1; float4 ase_texcoord2 : TEXCOORD2; UNITY_VERTEX_INPUT_INSTANCE_ID }; float4 ASEHDSampleSceneColor(float2 uv, float lod, float exposureMultiplier) { #if defined(REQUIRE_OPAQUE_TEXTURE) && defined(_SURFACE_TYPE_TRANSPARENT) && defined(SHADERPASS) && (SHADERPASS != SHADERPASS_LIGHT_TRANSPORT) return float4( SampleCameraColor(uv, lod) * exposureMultiplier, 1.0 ); #endif return float4(0.0, 0.0, 0.0, 1.0); } struct SurfaceDescription { float3 Color; float3 Emission; float Alpha; float AlphaClipThreshold; }; void BuildSurfaceData( FragInputs fragInputs, SurfaceDescription surfaceDescription, float3 V, out SurfaceData surfaceData ) { ZERO_INITIALIZE( SurfaceData, surfaceData ); surfaceData.color = surfaceDescription.Color; } void GetSurfaceAndBuiltinData( SurfaceDescription surfaceDescription, FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData ) { #if _ALPHATEST_ON DoAlphaTest( surfaceDescription.Alpha, surfaceDescription.AlphaClipThreshold ); #endif BuildSurfaceData( fragInputs, surfaceDescription, V, surfaceData ); ZERO_INITIALIZE( BuiltinData, builtinData ); builtinData.opacity = surfaceDescription.Alpha; builtinData.emissiveColor = surfaceDescription.Emission; } VertexOutput VertexFunction( VertexInput inputMesh ) { VertexOutput o; UNITY_SETUP_INSTANCE_ID( inputMesh ); UNITY_TRANSFER_INSTANCE_ID( inputMesh, o ); float3 ase_worldPos = GetAbsolutePositionWS( TransformObjectToWorld( (inputMesh.positionOS).xyz ) ); float2 texCoord185 = inputMesh.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 ); float3 objectToViewPos = TransformWorldToView(TransformObjectToWorld(inputMesh.positionOS)); float eyeDepth = -objectToViewPos.z; o.ase_texcoord1.x = eyeDepth; float4 ase_clipPos = TransformWorldToHClip( TransformObjectToWorld(inputMesh.positionOS)); float4 screenPos = ComputeScreenPos( ase_clipPos , _ProjectionParams.x ); o.ase_texcoord2 = screenPos; o.ase_texcoord = inputMesh.ase_texcoord; o.ase_color = inputMesh.ase_color; //setting value to unused interpolator channels and avoid initialization warnings o.ase_texcoord1.yzw = 0; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = inputMesh.positionOS.xyz; #else float3 defaultVertexValue = float3( 0, 0, 0 ); #endif float3 vertexValue = ( ( ase_worldPos - _WorldSpaceCameraPos ) * ( ( _CameraOffset + texCoord185.y ) * 0.01 ) ); #ifdef ASE_ABSOLUTE_VERTEX_POS inputMesh.positionOS.xyz = vertexValue; #else inputMesh.positionOS.xyz += vertexValue; #endif inputMesh.normalOS = inputMesh.normalOS ; float2 uv = float2( 0.0, 0.0 ); if( unity_MetaVertexControl.x ) { uv = inputMesh.uv1.xy * unity_LightmapST.xy + unity_LightmapST.zw; } else if( unity_MetaVertexControl.y ) { uv = inputMesh.uv2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; } o.positionCS = float4( uv * 2.0 - 1.0, inputMesh.positionOS.z > 0 ? 1.0e-4 : 0.0, 1.0 ); return o; } #if defined(TESSELLATION_ON) struct VertexControl { float3 positionOS : INTERNALTESSPOS; float3 normalOS : NORMAL; float4 uv1 : TEXCOORD1; float4 uv2 : TEXCOORD2; float4 ase_texcoord3 : TEXCOORD3; float4 ase_texcoord : TEXCOORD0; float4 ase_color : COLOR; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl Vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.positionOS = v.positionOS; o.normalOS = v.normalOS; o.uv1 = v.uv1; o.uv2 = v.uv2; o.ase_texcoord3 = v.ase_texcoord3; o.ase_texcoord = v.ase_texcoord; o.ase_color = v.ase_color; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if (SHADEROPTIONS_CAMERA_RELATIVE_RENDERING != 0) float3 cameraPos = 0; #else float3 cameraPos = _WorldSpaceCameraPos; #endif #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(float4(v[0].positionOS,1), float4(v[1].positionOS,1), float4(v[2].positionOS,1), tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), cameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(float4(v[0].positionOS,1), float4(v[1].positionOS,1), float4(v[2].positionOS,1), edgeLength, GetObjectToWorldMatrix(), cameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(float4(v[0].positionOS,1), float4(v[1].positionOS,1), float4(v[2].positionOS,1), edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), cameraPos, _ScreenParams, _FrustumPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [domain("tri")] [partitioning("fractional_odd")] [outputtopology("triangle_cw")] [patchconstantfunc("TessellationFunction")] [outputcontrolpoints(3)] VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) { return patch[id]; } [domain("tri")] VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { VertexInput o = (VertexInput) 0; o.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; o.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; o.uv1 = patch[0].uv1 * bary.x + patch[1].uv1 * bary.y + patch[2].uv1 * bary.z; o.uv2 = patch[0].uv2 * bary.x + patch[1].uv2 * bary.y + patch[2].uv2 * bary.z; o.ase_texcoord3 = patch[0].ase_texcoord3 * bary.x + patch[1].ase_texcoord3 * bary.y + patch[2].ase_texcoord3 * bary.z; o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.positionOS.xyz - patch[i].normalOS * (dot(o.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); float phongStrength = _TessPhongStrength; o.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.positionOS.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else VertexOutput Vert ( VertexInput v ) { return VertexFunction( v ); } #endif float4 Frag( VertexOutput packedInput ) : SV_Target { UNITY_SETUP_INSTANCE_ID( packedInput ); FragInputs input; ZERO_INITIALIZE( FragInputs, input ); input.tangentToWorld = k_identity3x3; input.positionSS = packedInput.positionCS; PositionInputs posInput = GetPositionInput( input.positionSS.xy, _ScreenSize.zw, input.positionSS.z, input.positionSS.w, input.positionRWS ); float3 V = float3( 1.0, 1.0, 1.0 ); SurfaceDescription surfaceDescription = (SurfaceDescription)0; float3 temp_cast_0 = (0.0).xxx; float2 uv_DistortionTexture = packedInput.ase_texcoord.xy * _DistortionTexture_ST.xy + _DistortionTexture_ST.zw; float2 lerpResult390 = lerp( float2( 0,0 ) , (tex2D( _DistortionTexture, uv_DistortionTexture )).rg , _ExtraNoiseLerp); float3 appendResult396 = (float3(lerpResult390 , 1.0)); float2 uv_Texture = packedInput.ase_texcoord.xy * _Texture_ST.xy + _Texture_ST.zw; float dotResult290 = dot( tex2D( _Texture, uv_Texture ) , _TextureChannel ); float2 uv_DissolveMask = packedInput.ase_texcoord.xy * _DissolveMask_ST.xy + _DissolveMask_ST.zw; float4 texCoord289 = packedInput.ase_texcoord; texCoord289.xy = packedInput.ase_texcoord.xy * float2( 1,1 ) + float2( 0,0 ); float4 temp_output_356_0 = ( packedInput.ase_color.a * ( saturate( dotResult290 ) * ( saturate( tex2D( _DissolveMask, uv_DissolveMask ) ) + texCoord289.z ) ) ); float eyeDepth = packedInput.ase_texcoord1.x; float4 screenPos = packedInput.ase_texcoord2; float4 ase_screenPosNorm = screenPos / screenPos.w; ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; float eyeDepth28_g1 = LinearEyeDepth(SampleCameraDepth( ase_screenPosNorm.xy ),_ZBufferParams); float2 temp_output_20_0_g1 = ( (appendResult396).xy * ( ( temp_output_356_0 * _DistortionStrength ).r / max( eyeDepth , 0.1 ) ) * saturate( ( eyeDepth28_g1 - eyeDepth ) ) ); float eyeDepth2_g1 = LinearEyeDepth(SampleCameraDepth( ( float4( temp_output_20_0_g1, 0.0 , 0.0 ) + ase_screenPosNorm ).xy ),_ZBufferParams); float2 temp_output_32_0_g1 = (( float4( ( temp_output_20_0_g1 * saturate( ( eyeDepth2_g1 - eyeDepth ) ) ), 0.0 , 0.0 ) + ase_screenPosNorm )).xy; float4 fetchOpaqueVal394 = ASEHDSampleSceneColor(temp_output_32_0_g1, 0.0, GetInverseCurrentExposureMultiplier()); surfaceDescription.Color = temp_cast_0; surfaceDescription.Emission = (fetchOpaqueVal394).rgb; surfaceDescription.Alpha = saturate( temp_output_356_0 ).r; surfaceDescription.AlphaClipThreshold = _AlphaCutoff; SurfaceData surfaceData; BuiltinData builtinData; GetSurfaceAndBuiltinData( surfaceDescription,input, V, posInput, surfaceData, builtinData ); BSDFData bsdfData = ConvertSurfaceDataToBSDFData( input.positionSS.xy, surfaceData ); LightTransportData lightTransportData = GetLightTransportData( surfaceData, builtinData, bsdfData ); float4 res = float4( 0.0, 0.0, 0.0, 1.0 ); if( unity_MetaFragmentControl.x ) { res.rgb = clamp( pow( abs( lightTransportData.diffuseColor ), saturate( unity_OneOverOutputBoost ) ), 0, unity_MaxOutputValue ); } if( unity_MetaFragmentControl.y ) { res.rgb = lightTransportData.emissiveColor; } return res; } ENDHLSL } Pass { Name "SceneSelectionPass" Tags { "LightMode"="SceneSelectionPass" } Cull [_CullMode] ZWrite On ColorMask 0 HLSLPROGRAM #pragma multi_compile_instancing #define HAVE_MESH_MODIFICATION 1 #define ASE_SRP_VERSION 100501 #define SHADERPASS SHADERPASS_DEPTH_ONLY #define SCENESELECTIONPASS #pragma editor_sync_compilation #pragma shader_feature _SURFACE_TYPE_TRANSPARENT #pragma shader_feature_local _ _BLENDMODE_ALPHA _BLENDMODE_ADD _BLENDMODE_PRE_MULTIPLY #pragma shader_feature_local _ALPHATEST_ON #pragma shader_feature_local _ENABLE_FOG_ON_TRANSPARENT #pragma vertex Vert #pragma fragment Frag #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphHeader.hlsl" int _ObjectId; int _PassValue; CBUFFER_START( UnityPerMaterial ) float4 _DistortionTexture_ST; float4 _Texture_ST; float4 _TextureChannel; float4 _DissolveMask_ST; float _CameraOffset; float _ExtraNoiseLerp; float _DistortionStrength; float4 _EmissionColor; float _RenderQueueType; #ifdef _ADD_PRECOMPUTED_VELOCITY float _AddPrecomputedVelocity; #endif #ifdef _ENABLE_SHADOW_MATTE float _ShadowMatteFilter; #endif float _StencilRef; float _StencilWriteMask; float _StencilRefDepth; float _StencilWriteMaskDepth; float _StencilRefMV; float _StencilWriteMaskMV; float _StencilRefDistortionVec; float _StencilWriteMaskDistortionVec; float _StencilWriteMaskGBuffer; float _StencilRefGBuffer; float _ZTestGBuffer; float _RequireSplitLighting; float _ReceivesSSR; float _SurfaceType; float _BlendMode; float _SrcBlend; float _DstBlend; float _AlphaSrcBlend; float _AlphaDstBlend; float _ZWrite; float _TransparentZWrite; float _CullMode; float _TransparentSortPriority; float _EnableFogOnTransparent; float _CullModeForward; float _TransparentCullMode; float _ZTestDepthEqualForOpaque; float _ZTestTransparent; float _TransparentBackfaceEnable; float _AlphaCutoffEnable; float _AlphaCutoff; float _UseShadowThreshold; float _DoubleSidedEnable; float _DoubleSidedNormalMode; float4 _DoubleSidedConstants; #ifdef TESSELLATION_ON float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END sampler2D _Texture; sampler2D _DissolveMask; #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl" struct VertexInput { float3 positionOS : POSITION; float3 normalOS : NORMAL; float4 ase_texcoord3 : TEXCOORD3; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float4 positionCS : SV_Position; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; struct SurfaceDescription { float Alpha; float AlphaClipThreshold; }; void BuildSurfaceData(FragInputs fragInputs, SurfaceDescription surfaceDescription, float3 V, out SurfaceData surfaceData) { ZERO_INITIALIZE(SurfaceData, surfaceData); } void GetSurfaceAndBuiltinData(SurfaceDescription surfaceDescription, FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData) { #if _ALPHATEST_ON DoAlphaTest ( surfaceDescription.Alpha, surfaceDescription.AlphaClipThreshold ); #endif BuildSurfaceData(fragInputs, surfaceDescription, V, surfaceData); ZERO_INITIALIZE(BuiltinData, builtinData); builtinData.opacity = surfaceDescription.Alpha; } VertexOutput VertexFunction( VertexInput inputMesh ) { VertexOutput o; UNITY_SETUP_INSTANCE_ID(inputMesh); UNITY_TRANSFER_INSTANCE_ID(inputMesh, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o ); float3 ase_worldPos = GetAbsolutePositionWS( TransformObjectToWorld( (inputMesh.positionOS).xyz ) ); float2 texCoord185 = inputMesh.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 ); o.ase_color = inputMesh.ase_color; o.ase_texcoord = inputMesh.ase_texcoord; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = inputMesh.positionOS.xyz; #else float3 defaultVertexValue = float3( 0, 0, 0 ); #endif float3 vertexValue = ( ( ase_worldPos - _WorldSpaceCameraPos ) * ( ( _CameraOffset + texCoord185.y ) * 0.01 ) ); #ifdef ASE_ABSOLUTE_VERTEX_POS inputMesh.positionOS.xyz = vertexValue; #else inputMesh.positionOS.xyz += vertexValue; #endif inputMesh.normalOS = inputMesh.normalOS ; float3 positionRWS = TransformObjectToWorld(inputMesh.positionOS); o.positionCS = TransformWorldToHClip(positionRWS); return o; } #if defined(TESSELLATION_ON) struct VertexControl { float3 positionOS : INTERNALTESSPOS; float3 normalOS : NORMAL; float4 ase_texcoord3 : TEXCOORD3; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl Vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.positionOS = v.positionOS; o.normalOS = v.normalOS; o.ase_texcoord3 = v.ase_texcoord3; o.ase_color = v.ase_color; o.ase_texcoord = v.ase_texcoord; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if (SHADEROPTIONS_CAMERA_RELATIVE_RENDERING != 0) float3 cameraPos = 0; #else float3 cameraPos = _WorldSpaceCameraPos; #endif #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(float4(v[0].positionOS,1), float4(v[1].positionOS,1), float4(v[2].positionOS,1), tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), cameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(float4(v[0].positionOS,1), float4(v[1].positionOS,1), float4(v[2].positionOS,1), edgeLength, GetObjectToWorldMatrix(), cameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(float4(v[0].positionOS,1), float4(v[1].positionOS,1), float4(v[2].positionOS,1), edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), cameraPos, _ScreenParams, _FrustumPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [domain("tri")] [partitioning("fractional_odd")] [outputtopology("triangle_cw")] [patchconstantfunc("TessellationFunction")] [outputcontrolpoints(3)] VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) { return patch[id]; } [domain("tri")] VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { VertexInput o = (VertexInput) 0; o.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; o.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; o.ase_texcoord3 = patch[0].ase_texcoord3 * bary.x + patch[1].ase_texcoord3 * bary.y + patch[2].ase_texcoord3 * bary.z; o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.positionOS.xyz - patch[i].normalOS * (dot(o.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); float phongStrength = _TessPhongStrength; o.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.positionOS.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else VertexOutput Vert ( VertexInput v ) { return VertexFunction( v ); } #endif void Frag( VertexOutput packedInput , out float4 outColor : SV_Target0 #ifdef _DEPTHOFFSET_ON , out float outputDepth : SV_Depth #endif ) { UNITY_SETUP_INSTANCE_ID( packedInput ); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( packedInput ); FragInputs input; ZERO_INITIALIZE(FragInputs, input); input.tangentToWorld = k_identity3x3; input.positionSS = packedInput.positionCS; PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, input.positionSS.z, input.positionSS.w, input.positionRWS); float3 V = float3( 1.0, 1.0, 1.0 ); SurfaceData surfaceData; BuiltinData builtinData; SurfaceDescription surfaceDescription = (SurfaceDescription)0; float2 uv_Texture = packedInput.ase_texcoord.xy * _Texture_ST.xy + _Texture_ST.zw; float dotResult290 = dot( tex2D( _Texture, uv_Texture ) , _TextureChannel ); float2 uv_DissolveMask = packedInput.ase_texcoord.xy * _DissolveMask_ST.xy + _DissolveMask_ST.zw; float4 texCoord289 = packedInput.ase_texcoord; texCoord289.xy = packedInput.ase_texcoord.xy * float2( 1,1 ) + float2( 0,0 ); float4 temp_output_356_0 = ( packedInput.ase_color.a * ( saturate( dotResult290 ) * ( saturate( tex2D( _DissolveMask, uv_DissolveMask ) ) + texCoord289.z ) ) ); surfaceDescription.Alpha = saturate( temp_output_356_0 ).r; surfaceDescription.AlphaClipThreshold = _AlphaCutoff; GetSurfaceAndBuiltinData(surfaceDescription, input, V, posInput, surfaceData, builtinData); #ifdef _DEPTHOFFSET_ON outputDepth = posInput.deviceDepth; #endif outColor = float4( _ObjectId, _PassValue, 1.0, 1.0 ); } ENDHLSL } Pass { Name "DepthForwardOnly" Tags { "LightMode"="DepthForwardOnly" } Cull [_CullMode] ZWrite On Stencil { Ref [_StencilRefDepth] WriteMask [_StencilWriteMaskDepth] Comp Always Pass Replace Fail Keep ZFail Keep } ColorMask 0 0 HLSLPROGRAM #pragma multi_compile_instancing #define HAVE_MESH_MODIFICATION 1 #define ASE_SRP_VERSION 100501 #define SHADERPASS SHADERPASS_DEPTH_ONLY #pragma multi_compile _ WRITE_MSAA_DEPTH #pragma shader_feature _SURFACE_TYPE_TRANSPARENT #pragma shader_feature_local _ _BLENDMODE_ALPHA _BLENDMODE_ADD _BLENDMODE_PRE_MULTIPLY #pragma shader_feature_local _ALPHATEST_ON #pragma shader_feature_local _ENABLE_FOG_ON_TRANSPARENT #pragma vertex Vert #pragma fragment Frag #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphHeader.hlsl" CBUFFER_START( UnityPerMaterial ) float4 _DistortionTexture_ST; float4 _Texture_ST; float4 _TextureChannel; float4 _DissolveMask_ST; float _CameraOffset; float _ExtraNoiseLerp; float _DistortionStrength; float4 _EmissionColor; float _RenderQueueType; #ifdef _ADD_PRECOMPUTED_VELOCITY float _AddPrecomputedVelocity; #endif #ifdef _ENABLE_SHADOW_MATTE float _ShadowMatteFilter; #endif float _StencilRef; float _StencilWriteMask; float _StencilRefDepth; float _StencilWriteMaskDepth; float _StencilRefMV; float _StencilWriteMaskMV; float _StencilRefDistortionVec; float _StencilWriteMaskDistortionVec; float _StencilWriteMaskGBuffer; float _StencilRefGBuffer; float _ZTestGBuffer; float _RequireSplitLighting; float _ReceivesSSR; float _SurfaceType; float _BlendMode; float _SrcBlend; float _DstBlend; float _AlphaSrcBlend; float _AlphaDstBlend; float _ZWrite; float _TransparentZWrite; float _CullMode; float _TransparentSortPriority; float _EnableFogOnTransparent; float _CullModeForward; float _TransparentCullMode; float _ZTestDepthEqualForOpaque; float _ZTestTransparent; float _TransparentBackfaceEnable; float _AlphaCutoffEnable; float _AlphaCutoff; float _UseShadowThreshold; float _DoubleSidedEnable; float _DoubleSidedNormalMode; float4 _DoubleSidedConstants; #ifdef TESSELLATION_ON float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END sampler2D _Texture; sampler2D _DissolveMask; #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl" struct VertexInput { float3 positionOS : POSITION; float3 normalOS : NORMAL; float4 ase_texcoord3 : TEXCOORD3; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float4 positionCS : SV_Position; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; struct SurfaceDescription { float Alpha; float AlphaClipThreshold; }; void BuildSurfaceData(FragInputs fragInputs, SurfaceDescription surfaceDescription, float3 V, out SurfaceData surfaceData) { ZERO_INITIALIZE(SurfaceData, surfaceData); } void GetSurfaceAndBuiltinData(SurfaceDescription surfaceDescription, FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData) { #if _ALPHATEST_ON DoAlphaTest ( surfaceDescription.Alpha, surfaceDescription.AlphaClipThreshold ); #endif BuildSurfaceData(fragInputs, surfaceDescription, V, surfaceData); ZERO_INITIALIZE(BuiltinData, builtinData); builtinData.opacity = surfaceDescription.Alpha; } VertexOutput VertexFunction( VertexInput inputMesh ) { VertexOutput o; UNITY_SETUP_INSTANCE_ID(inputMesh); UNITY_TRANSFER_INSTANCE_ID(inputMesh, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o ); float3 ase_worldPos = GetAbsolutePositionWS( TransformObjectToWorld( (inputMesh.positionOS).xyz ) ); float2 texCoord185 = inputMesh.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 ); o.ase_color = inputMesh.ase_color; o.ase_texcoord = inputMesh.ase_texcoord; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = inputMesh.positionOS.xyz; #else float3 defaultVertexValue = float3( 0, 0, 0 ); #endif float3 vertexValue = ( ( ase_worldPos - _WorldSpaceCameraPos ) * ( ( _CameraOffset + texCoord185.y ) * 0.01 ) ); #ifdef ASE_ABSOLUTE_VERTEX_POS inputMesh.positionOS.xyz = vertexValue; #else inputMesh.positionOS.xyz += vertexValue; #endif inputMesh.normalOS = inputMesh.normalOS ; float3 positionRWS = TransformObjectToWorld(inputMesh.positionOS); o.positionCS = TransformWorldToHClip(positionRWS); return o; } #if defined(TESSELLATION_ON) struct VertexControl { float3 positionOS : INTERNALTESSPOS; float3 normalOS : NORMAL; float4 ase_texcoord3 : TEXCOORD3; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl Vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.positionOS = v.positionOS; o.normalOS = v.normalOS; o.ase_texcoord3 = v.ase_texcoord3; o.ase_color = v.ase_color; o.ase_texcoord = v.ase_texcoord; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if (SHADEROPTIONS_CAMERA_RELATIVE_RENDERING != 0) float3 cameraPos = 0; #else float3 cameraPos = _WorldSpaceCameraPos; #endif #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(float4(v[0].positionOS,1), float4(v[1].positionOS,1), float4(v[2].positionOS,1), tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), cameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(float4(v[0].positionOS,1), float4(v[1].positionOS,1), float4(v[2].positionOS,1), edgeLength, GetObjectToWorldMatrix(), cameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(float4(v[0].positionOS,1), float4(v[1].positionOS,1), float4(v[2].positionOS,1), edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), cameraPos, _ScreenParams, _FrustumPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [domain("tri")] [partitioning("fractional_odd")] [outputtopology("triangle_cw")] [patchconstantfunc("TessellationFunction")] [outputcontrolpoints(3)] VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) { return patch[id]; } [domain("tri")] VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { VertexInput o = (VertexInput) 0; o.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; o.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; o.ase_texcoord3 = patch[0].ase_texcoord3 * bary.x + patch[1].ase_texcoord3 * bary.y + patch[2].ase_texcoord3 * bary.z; o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.positionOS.xyz - patch[i].normalOS * (dot(o.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); float phongStrength = _TessPhongStrength; o.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.positionOS.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else VertexOutput Vert ( VertexInput v ) { return VertexFunction( v ); } #endif void Frag( VertexOutput packedInput #ifdef WRITE_NORMAL_BUFFER , out float4 outNormalBuffer : SV_Target0 #ifdef WRITE_MSAA_DEPTH , out float1 depthColor : SV_Target1 #endif #elif defined(WRITE_MSAA_DEPTH) , out float4 outNormalBuffer : SV_Target0 , out float1 depthColor : SV_Target1 #elif defined(SCENESELECTIONPASS) , out float4 outColor : SV_Target0 #endif #ifdef _DEPTHOFFSET_ON , out float outputDepth : SV_Depth #endif ) { UNITY_SETUP_INSTANCE_ID( packedInput ); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( packedInput ); FragInputs input; ZERO_INITIALIZE(FragInputs, input); input.tangentToWorld = k_identity3x3; input.positionSS = packedInput.positionCS; PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, input.positionSS.z, input.positionSS.w, input.positionRWS); float3 V = float3( 1.0, 1.0, 1.0 ); SurfaceDescription surfaceDescription = (SurfaceDescription)0; float2 uv_Texture = packedInput.ase_texcoord.xy * _Texture_ST.xy + _Texture_ST.zw; float dotResult290 = dot( tex2D( _Texture, uv_Texture ) , _TextureChannel ); float2 uv_DissolveMask = packedInput.ase_texcoord.xy * _DissolveMask_ST.xy + _DissolveMask_ST.zw; float4 texCoord289 = packedInput.ase_texcoord; texCoord289.xy = packedInput.ase_texcoord.xy * float2( 1,1 ) + float2( 0,0 ); float4 temp_output_356_0 = ( packedInput.ase_color.a * ( saturate( dotResult290 ) * ( saturate( tex2D( _DissolveMask, uv_DissolveMask ) ) + texCoord289.z ) ) ); surfaceDescription.Alpha = saturate( temp_output_356_0 ).r; surfaceDescription.AlphaClipThreshold = _AlphaCutoff; SurfaceData surfaceData; BuiltinData builtinData; GetSurfaceAndBuiltinData(surfaceDescription, input, V, posInput, surfaceData, builtinData); #ifdef _DEPTHOFFSET_ON outputDepth = posInput.deviceDepth; #endif #ifdef WRITE_NORMAL_BUFFER EncodeIntoNormalBuffer( ConvertSurfaceDataToNormalData( surfaceData ), posInput.positionSS, outNormalBuffer ); #ifdef WRITE_MSAA_DEPTH depthColor = packedInput.positionCS.z; #endif #elif defined(WRITE_MSAA_DEPTH) outNormalBuffer = float4( 0.0, 0.0, 0.0, 1.0 ); depthColor = packedInput.positionCS.z; #elif defined(SCENESELECTIONPASS) outColor = float4( _ObjectId, _PassValue, 1.0, 1.0 ); #endif } ENDHLSL } Pass { Name "Motion Vectors" Tags { "LightMode"="MotionVectors" } Cull [_CullMode] ZWrite On Stencil { Ref [_StencilRefMV] WriteMask [_StencilWriteMaskMV] Comp Always Pass Replace Fail Keep ZFail Keep } HLSLPROGRAM #pragma multi_compile_instancing #define HAVE_MESH_MODIFICATION 1 #define ASE_SRP_VERSION 100501 #define SHADERPASS SHADERPASS_MOTION_VECTORS #pragma multi_compile _ WRITE_MSAA_DEPTH #pragma shader_feature _SURFACE_TYPE_TRANSPARENT #pragma shader_feature_local _ _BLENDMODE_ALPHA _BLENDMODE_ADD _BLENDMODE_PRE_MULTIPLY #pragma shader_feature_local _ALPHATEST_ON #pragma shader_feature_local _ENABLE_FOG_ON_TRANSPARENT #pragma vertex Vert #pragma fragment Frag #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphHeader.hlsl" CBUFFER_START( UnityPerMaterial ) float4 _DistortionTexture_ST; float4 _Texture_ST; float4 _TextureChannel; float4 _DissolveMask_ST; float _CameraOffset; float _ExtraNoiseLerp; float _DistortionStrength; float4 _EmissionColor; float _RenderQueueType; #ifdef _ADD_PRECOMPUTED_VELOCITY float _AddPrecomputedVelocity; #endif #ifdef _ENABLE_SHADOW_MATTE float _ShadowMatteFilter; #endif float _StencilRef; float _StencilWriteMask; float _StencilRefDepth; float _StencilWriteMaskDepth; float _StencilRefMV; float _StencilWriteMaskMV; float _StencilRefDistortionVec; float _StencilWriteMaskDistortionVec; float _StencilWriteMaskGBuffer; float _StencilRefGBuffer; float _ZTestGBuffer; float _RequireSplitLighting; float _ReceivesSSR; float _SurfaceType; float _BlendMode; float _SrcBlend; float _DstBlend; float _AlphaSrcBlend; float _AlphaDstBlend; float _ZWrite; float _TransparentZWrite; float _CullMode; float _TransparentSortPriority; float _EnableFogOnTransparent; float _CullModeForward; float _TransparentCullMode; float _ZTestDepthEqualForOpaque; float _ZTestTransparent; float _TransparentBackfaceEnable; float _AlphaCutoffEnable; float _AlphaCutoff; float _UseShadowThreshold; float _DoubleSidedEnable; float _DoubleSidedNormalMode; float4 _DoubleSidedConstants; #ifdef TESSELLATION_ON float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END sampler2D _Texture; sampler2D _DissolveMask; #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl" struct VertexInput { float3 positionOS : POSITION; float3 normalOS : NORMAL; float3 previousPositionOS : TEXCOORD4; #if defined (_ADD_PRECOMPUTED_VELOCITY) float3 precomputedVelocity : TEXCOORD5; #endif float4 ase_texcoord3 : TEXCOORD3; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float4 vmeshPositionCS : SV_Position; float3 vmeshInterp00 : TEXCOORD0; float3 vpassInterpolators0 : TEXCOORD1; //interpolators0 float3 vpassInterpolators1 : TEXCOORD2; //interpolators1 float4 ase_color : COLOR; float4 ase_texcoord3 : TEXCOORD3; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; struct SurfaceDescription { float Alpha; float AlphaClipThreshold; }; void BuildSurfaceData(FragInputs fragInputs, SurfaceDescription surfaceDescription, float3 V, out SurfaceData surfaceData) { ZERO_INITIALIZE(SurfaceData, surfaceData); } void GetSurfaceAndBuiltinData(SurfaceDescription surfaceDescription, FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData) { #if _ALPHATEST_ON DoAlphaTest ( surfaceDescription.Alpha, surfaceDescription.AlphaClipThreshold ); #endif BuildSurfaceData(fragInputs, surfaceDescription, V, surfaceData); ZERO_INITIALIZE(BuiltinData, builtinData); builtinData.opacity = surfaceDescription.Alpha; } VertexInput ApplyMeshModification(VertexInput inputMesh, float3 timeParameters, inout VertexOutput o ) { _TimeParameters.xyz = timeParameters; float3 ase_worldPos = GetAbsolutePositionWS( TransformObjectToWorld( (inputMesh.positionOS).xyz ) ); float2 texCoord185 = inputMesh.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 ); o.ase_color = inputMesh.ase_color; o.ase_texcoord3 = inputMesh.ase_texcoord; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = inputMesh.positionOS.xyz; #else float3 defaultVertexValue = float3( 0, 0, 0 ); #endif float3 vertexValue = ( ( ase_worldPos - _WorldSpaceCameraPos ) * ( ( _CameraOffset + texCoord185.y ) * 0.01 ) ); #ifdef ASE_ABSOLUTE_VERTEX_POS inputMesh.positionOS.xyz = vertexValue; #else inputMesh.positionOS.xyz += vertexValue; #endif inputMesh.normalOS = inputMesh.normalOS ; return inputMesh; } VertexOutput VertexFunction(VertexInput inputMesh) { VertexOutput o = (VertexOutput)0; VertexInput defaultMesh = inputMesh; UNITY_SETUP_INSTANCE_ID(inputMesh); UNITY_TRANSFER_INSTANCE_ID(inputMesh, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o ); inputMesh = ApplyMeshModification( inputMesh, _TimeParameters.xyz, o); float3 positionRWS = TransformObjectToWorld(inputMesh.positionOS); float3 normalWS = TransformObjectToWorldNormal(inputMesh.normalOS); float3 VMESHpositionRWS = positionRWS; float4 VMESHpositionCS = TransformWorldToHClip(positionRWS); //#if defined(UNITY_REVERSED_Z) // VMESHpositionCS.z -= unity_MotionVectorsParams.z * VMESHpositionCS.w; //#else // VMESHpositionCS.z += unity_MotionVectorsParams.z * VMESHpositionCS.w; //#endif float4 VPASSpreviousPositionCS; float4 VPASSpositionCS = mul(UNITY_MATRIX_UNJITTERED_VP, float4(VMESHpositionRWS, 1.0)); bool forceNoMotion = unity_MotionVectorsParams.y == 0.0; if (forceNoMotion) { VPASSpreviousPositionCS = float4(0.0, 0.0, 0.0, 1.0); } else { bool hasDeformation = unity_MotionVectorsParams.x > 0.0; float3 effectivePositionOS = (hasDeformation ? inputMesh.previousPositionOS : defaultMesh.positionOS); #if defined(_ADD_PRECOMPUTED_VELOCITY) effectivePositionOS -= inputMesh.precomputedVelocity; #endif #if defined(HAVE_MESH_MODIFICATION) VertexInput previousMesh = defaultMesh; previousMesh.positionOS = effectivePositionOS ; VertexOutput test = (VertexOutput)0; float3 curTime = _TimeParameters.xyz; previousMesh = ApplyMeshModification(previousMesh, _LastTimeParameters.xyz, test); _TimeParameters.xyz = curTime; float3 previousPositionRWS = TransformPreviousObjectToWorld(previousMesh.positionOS); #else float3 previousPositionRWS = TransformPreviousObjectToWorld(effectivePositionOS); #endif #ifdef ATTRIBUTES_NEED_NORMAL float3 normalWS = TransformPreviousObjectToWorldNormal(defaultMesh.normalOS); #else float3 normalWS = float3(0.0, 0.0, 0.0); #endif #if defined(HAVE_VERTEX_MODIFICATION) //ApplyVertexModification(inputMesh, normalWS, previousPositionRWS, _LastTimeParameters.xyz); #endif VPASSpreviousPositionCS = mul(UNITY_MATRIX_PREV_VP, float4(previousPositionRWS, 1.0)); } o.vmeshPositionCS = VMESHpositionCS; o.vmeshInterp00.xyz = VMESHpositionRWS; o.vpassInterpolators0 = float3(VPASSpositionCS.xyw); o.vpassInterpolators1 = float3(VPASSpreviousPositionCS.xyw); return o; } #if defined(TESSELLATION_ON) struct VertexControl { float3 positionOS : INTERNALTESSPOS; float3 normalOS : NORMAL; float3 previousPositionOS : TEXCOORD4; #if defined (_ADD_PRECOMPUTED_VELOCITY) float3 precomputedVelocity : TEXCOORD5; #endif float4 ase_texcoord3 : TEXCOORD3; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl Vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.positionOS = v.positionOS; o.normalOS = v.normalOS; o.previousPositionOS = v.previousPositionOS; #if defined (_ADD_PRECOMPUTED_VELOCITY) o.precomputedVelocity = v.precomputedVelocity; #endif o.ase_texcoord3 = v.ase_texcoord3; o.ase_color = v.ase_color; o.ase_texcoord = v.ase_texcoord; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if (SHADEROPTIONS_CAMERA_RELATIVE_RENDERING != 0) float3 cameraPos = 0; #else float3 cameraPos = _WorldSpaceCameraPos; #endif #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(float4(v[0].positionOS,1), float4(v[1].positionOS,1), float4(v[2].positionOS,1), tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), cameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(float4(v[0].positionOS,1), float4(v[1].positionOS,1), float4(v[2].positionOS,1), edgeLength, GetObjectToWorldMatrix(), cameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(float4(v[0].positionOS,1), float4(v[1].positionOS,1), float4(v[2].positionOS,1), edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), cameraPos, _ScreenParams, _FrustumPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [domain("tri")] [partitioning("fractional_odd")] [outputtopology("triangle_cw")] [patchconstantfunc("TessellationFunction")] [outputcontrolpoints(3)] VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) { return patch[id]; } [domain("tri")] VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { VertexInput o = (VertexInput) 0; o.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; o.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; o.previousPositionOS = patch[0].previousPositionOS * bary.x + patch[1].previousPositionOS * bary.y + patch[2].previousPositionOS * bary.z; #if defined (_ADD_PRECOMPUTED_VELOCITY) o.precomputedVelocity = patch[0].precomputedVelocity * bary.x + patch[1].precomputedVelocity * bary.y + patch[2].precomputedVelocity * bary.z; #endif o.ase_texcoord3 = patch[0].ase_texcoord3 * bary.x + patch[1].ase_texcoord3 * bary.y + patch[2].ase_texcoord3 * bary.z; o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.positionOS.xyz - patch[i].normalOS * (dot(o.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); float phongStrength = _TessPhongStrength; o.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.positionOS.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else VertexOutput Vert ( VertexInput v ) { return VertexFunction( v ); } #endif void Frag( VertexOutput packedInput , out float4 outMotionVector : SV_Target0 #ifdef WRITE_NORMAL_BUFFER , out float4 outNormalBuffer : SV_Target1 #ifdef WRITE_MSAA_DEPTH , out float1 depthColor : SV_Target2 #endif #elif defined(WRITE_MSAA_DEPTH) , out float4 outNormalBuffer : SV_Target1 , out float1 depthColor : SV_Target2 #endif #ifdef _DEPTHOFFSET_ON , out float outputDepth : SV_Depth #endif ) { UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( packedInput ); UNITY_SETUP_INSTANCE_ID( packedInput ); FragInputs input; ZERO_INITIALIZE(FragInputs, input); input.tangentToWorld = k_identity3x3; input.positionSS = packedInput.vmeshPositionCS; input.positionRWS = packedInput.vmeshInterp00.xyz; PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, input.positionSS.z, input.positionSS.w, input.positionRWS); float3 V = GetWorldSpaceNormalizeViewDir(input.positionRWS); SurfaceDescription surfaceDescription = (SurfaceDescription)0; float2 uv_Texture = packedInput.ase_texcoord3.xy * _Texture_ST.xy + _Texture_ST.zw; float dotResult290 = dot( tex2D( _Texture, uv_Texture ) , _TextureChannel ); float2 uv_DissolveMask = packedInput.ase_texcoord3.xy * _DissolveMask_ST.xy + _DissolveMask_ST.zw; float4 texCoord289 = packedInput.ase_texcoord3; texCoord289.xy = packedInput.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 ); float4 temp_output_356_0 = ( packedInput.ase_color.a * ( saturate( dotResult290 ) * ( saturate( tex2D( _DissolveMask, uv_DissolveMask ) ) + texCoord289.z ) ) ); surfaceDescription.Alpha = saturate( temp_output_356_0 ).r; surfaceDescription.AlphaClipThreshold = _AlphaCutoff; SurfaceData surfaceData; BuiltinData builtinData; GetSurfaceAndBuiltinData(surfaceDescription, input, V, posInput, surfaceData, builtinData); float4 VPASSpositionCS = float4(packedInput.vpassInterpolators0.xy, 0.0, packedInput.vpassInterpolators0.z); float4 VPASSpreviousPositionCS = float4(packedInput.vpassInterpolators1.xy, 0.0, packedInput.vpassInterpolators1.z); #ifdef _DEPTHOFFSET_ON VPASSpositionCS.w += builtinData.depthOffset; VPASSpreviousPositionCS.w += builtinData.depthOffset; #endif float2 motionVector = CalculateMotionVector( VPASSpositionCS, VPASSpreviousPositionCS ); EncodeMotionVector( motionVector * 0.5, outMotionVector ); bool forceNoMotion = unity_MotionVectorsParams.y == 0.0; if( forceNoMotion ) outMotionVector = float4( 2.0, 0.0, 0.0, 0.0 ); #ifdef WRITE_NORMAL_BUFFER EncodeIntoNormalBuffer( ConvertSurfaceDataToNormalData( surfaceData ), posInput.positionSS, outNormalBuffer ); #ifdef WRITE_MSAA_DEPTH depthColor = packedInput.vmeshPositionCS.z; #endif #elif defined(WRITE_MSAA_DEPTH) outNormalBuffer = float4( 0.0, 0.0, 0.0, 1.0 ); depthColor = packedInput.vmeshPositionCS.z; #endif #ifdef _DEPTHOFFSET_ON outputDepth = posInput.deviceDepth; #endif } ENDHLSL } } CustomEditor "Rendering.HighDefinition.HDUnlitGUI" Fallback "Hidden/InternalErrorShader" } /*ASEBEGIN Version=18921 82;869;2546;1105;695.3583;1630.483;1.815347;True;True Node;AmplifyShaderEditor.TexturePropertyNode;264;-1024,768;Inherit;True;Property;_DissolveMask;Dissolve Mask;5;0;Create;True;0;0;0;False;0;False;None;9de7d5a3e4481e3448ba87f8921e75c0;False;white;Auto;Texture2D;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1 Node;AmplifyShaderEditor.TexturePropertyNode;273;-1024,0;Inherit;True;Property;_Texture;Texture;0;0;Create;True;0;0;0;False;0;False;None;0cf971d2416006347b1f6b1c60b49c1f;False;white;Auto;Texture2D;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1 Node;AmplifyShaderEditor.SamplerNode;285;-640,0;Inherit;True;Property;_TextureSample1;Texture Sample 1;1;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.Vector4Node;286;-640,256;Inherit;False;Property;_TextureChannel;Texture Channel;2;0;Create;True;0;0;0;False;0;False;0,1,0,0;0,1,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SamplerNode;272;-640,768;Inherit;True;Property;_TextureSample3;Texture Sample 3;1;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.TextureCoordinatesNode;289;0,1024;Inherit;False;0;-1;4;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SaturateNode;276;0,768;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.DotProductOpNode;290;-256,0;Inherit;False;2;0;COLOR;0,0,0,0;False;1;FLOAT4;0,0,0,0;False;1;FLOAT;0 Node;AmplifyShaderEditor.CommentaryNode;402;1742,-434;Inherit;False;852;849;Camera Offset;14;181;182;184;183;187;185;186;190;230;228;232;227;229;231;;0,0,0,1;0;0 Node;AmplifyShaderEditor.SaturateNode;292;0,0;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleAddOpNode;291;384,768;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;185;1792,256;Inherit;False;3;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.RangedFloatNode;187;1792,128;Inherit;False;Property;_CameraOffset;Camera Offset;6;0;Create;True;0;0;0;False;0;False;-40;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.WorldSpaceCameraPos;183;1792,-128;Inherit;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 Node;AmplifyShaderEditor.WorldPosInputsNode;181;1792,-384;Inherit;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 Node;AmplifyShaderEditor.VertexColorNode;355;-1024,-896;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SimpleAddOpNode;186;2048,128;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;293;384,0;Inherit;False;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;190;2432,128;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0.01;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleSubtractOpNode;182;2048,-384;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;356;-640,-896;Inherit;True;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.RangedFloatNode;391;-640,-1152;Inherit;False;Property;_ExtraNoiseLerp;Extra Noise Lerp;3;0;Create;True;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;387;768,-896;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.ScreenColorNode;394;1280,-1280;Inherit;False;Global;_GrabScreen0;Grab Screen 0;10;0;Create;True;0;0;0;False;0;False;Object;-1;False;False;False;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.ComponentMaskNode;398;1536,-1280;Inherit;False;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.SaturateNode;401;768,-512;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;184;2432,-384;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.FunctionNode;393;896,-1280;Inherit;True;DepthMaskedRefraction;-1;;1;c805f061214177c42bca056464193f81;2,40,0,103,0;2;35;FLOAT3;0,0,0;False;37;FLOAT;0.02;False;1;FLOAT2;38 Node;AmplifyShaderEditor.RangedFloatNode;403;2432,-1280;Inherit;False;Constant;_Float3;Float 3;7;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.ComponentMaskNode;389;-640,-1280;Inherit;False;True;True;False;False;1;0;COLOR;0,0,0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.SamplerNode;388;-1024,-1280;Inherit;True;Property;_DistortionTexture;Distortion Texture;1;0;Create;True;0;0;0;False;0;False;-1;None;8df04d0fe9f306340b1fbbc2f035bdd3;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.LerpOp;390;-128,-1280;Inherit;True;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.RangedFloatNode;392;768,-768;Inherit;False;Property;_DistortionStrength;Distortion Strength;4;0;Create;True;0;0;0;False;0;False;7;1;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.DynamicAppendNode;396;128,-1280;Inherit;False;FLOAT3;4;0;FLOAT2;0,0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;226;2841.932,-1107.952;Float;False;True;-1;2;Rendering.HighDefinition.HDUnlitGUI;0;11;Vefects/SH_Vefects_VFX_Heat_Haze;7f5cb9c3ea6481f469fdd856555439ef;True;Forward Unlit;0;0;Forward Unlit;9;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;RenderPipeline=HDRenderPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;True;5;True;7;d3d11;metal;vulkan;xboxone;xboxseries;playstation;switch;0;False;True;1;0;True;-20;0;True;-21;1;0;True;-22;0;True;-23;False;False;False;False;False;False;False;False;False;False;False;False;True;0;True;-26;False;False;False;False;False;False;False;False;False;True;True;0;True;-5;255;False;-1;255;True;-6;7;False;-1;3;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;True;0;True;-24;True;0;True;-32;False;True;1;LightMode=ForwardOnly;False;False;0;Hidden/InternalErrorShader;0;0;Standard;29;Surface Type;1; Rendering Pass ;0; Rendering Pass;1; Blending Mode;0; Receive Fog;1; Distortion;0; Distortion Mode;0; Distortion Only;1; Depth Write;1; Cull Mode;0; Depth Test;4;Double-Sided;0;Alpha Clipping;0;Motion Vectors;1; Add Precomputed Velocity;0;Shadow Matte;0;Cast Shadows;1;DOTS Instancing;0;GPU Instancing;1;Tessellation;0; Phong;0; Strength;0.5,False,-1; Type;0; Tess;16,False,-1; Min;10,False,-1; Max;25,False,-1; Edge Length;16,False,-1; Max Displacement;25,False,-1;Vertex Position,InvertActionOnDeselection;1;0;7;True;True;True;True;True;True;False;False;;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;228;1780.024,-354.8029;Float;False;False;-1;2;Rendering.HighDefinition.HDUnlitGUI;0;1;New Amplify Shader;7f5cb9c3ea6481f469fdd856555439ef;True;META;0;2;META;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;RenderPipeline=HDRenderPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;5;True;7;d3d11;metal;vulkan;xboxone;xboxseries;playstation;switch;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;231;1780.024,-354.8029;Float;False;False;-1;2;Rendering.HighDefinition.HDUnlitGUI;0;1;New Amplify Shader;7f5cb9c3ea6481f469fdd856555439ef;True;Motion Vectors;0;5;Motion Vectors;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;RenderPipeline=HDRenderPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;5;True;7;d3d11;metal;vulkan;xboxone;xboxseries;playstation;switch;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;0;True;-26;False;False;False;False;False;False;False;False;False;True;True;0;True;-9;255;False;-1;255;True;-10;7;False;-1;3;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;True;1;False;-1;False;False;True;1;LightMode=MotionVectors;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;227;1780.024,-354.8029;Float;False;False;-1;2;Rendering.HighDefinition.HDUnlitGUI;0;1;New Amplify Shader;7f5cb9c3ea6481f469fdd856555439ef;True;ShadowCaster;0;1;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;RenderPipeline=HDRenderPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;5;True;7;d3d11;metal;vulkan;xboxone;xboxseries;playstation;switch;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;0;True;-26;False;True;False;False;False;False;0;False;-1;False;False;False;False;False;False;False;False;False;True;1;False;-1;False;False;True;1;LightMode=ShadowCaster;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;230;1780.024,-354.8029;Float;False;False;-1;2;Rendering.HighDefinition.HDUnlitGUI;0;1;New Amplify Shader;7f5cb9c3ea6481f469fdd856555439ef;True;DepthForwardOnly;0;4;DepthForwardOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;RenderPipeline=HDRenderPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;5;True;7;d3d11;metal;vulkan;xboxone;xboxseries;playstation;switch;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;0;True;-26;False;True;False;False;False;False;0;False;-1;False;False;False;False;False;False;False;True;True;0;True;-7;255;False;-1;255;True;-8;7;False;-1;3;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;True;1;False;-1;False;False;True;1;LightMode=DepthForwardOnly;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;232;1780.024,-354.8029;Float;False;False;-1;2;Rendering.HighDefinition.HDUnlitGUI;0;1;New Amplify Shader;7f5cb9c3ea6481f469fdd856555439ef;True;DistortionVectors;0;6;DistortionVectors;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;RenderPipeline=HDRenderPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;5;True;7;d3d11;metal;vulkan;xboxone;xboxseries;playstation;switch;0;False;True;4;1;False;-1;1;False;-1;1;1;False;-1;1;False;-1;True;1;False;-1;1;False;-1;False;False;False;False;False;False;False;False;False;False;False;True;0;True;-26;False;False;False;False;False;False;False;False;False;True;True;0;True;-11;255;False;-1;255;True;-12;7;False;-1;3;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;True;2;False;-1;True;3;False;-1;False;True;1;LightMode=DistortionVectors;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;229;1780.024,-354.8029;Float;False;False;-1;2;Rendering.HighDefinition.HDUnlitGUI;0;1;New Amplify Shader;7f5cb9c3ea6481f469fdd856555439ef;True;SceneSelectionPass;0;3;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;RenderPipeline=HDRenderPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;5;True;7;d3d11;metal;vulkan;xboxone;xboxseries;playstation;switch;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;0;True;-26;False;True;False;False;False;False;0;False;-1;False;False;False;False;False;False;False;False;False;True;1;False;-1;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 WireConnection;285;0;273;0 WireConnection;272;0;264;0 WireConnection;276;0;272;0 WireConnection;290;0;285;0 WireConnection;290;1;286;0 WireConnection;292;0;290;0 WireConnection;291;0;276;0 WireConnection;291;1;289;3 WireConnection;186;0;187;0 WireConnection;186;1;185;2 WireConnection;293;0;292;0 WireConnection;293;1;291;0 WireConnection;190;0;186;0 WireConnection;182;0;181;0 WireConnection;182;1;183;0 WireConnection;356;0;355;4 WireConnection;356;1;293;0 WireConnection;387;0;356;0 WireConnection;387;1;392;0 WireConnection;394;0;393;38 WireConnection;398;0;394;0 WireConnection;401;0;356;0 WireConnection;184;0;182;0 WireConnection;184;1;190;0 WireConnection;393;35;396;0 WireConnection;393;37;387;0 WireConnection;389;0;388;0 WireConnection;390;1;389;0 WireConnection;390;2;391;0 WireConnection;396;0;390;0 WireConnection;226;0;403;0 WireConnection;226;1;398;0 WireConnection;226;2;401;0 WireConnection;226;6;184;0 ASEEND*/ //CHKSM=90C8839B1F4DC7C8FEA3E36AF995F61CC83513E0