// Made with Amplify Shader Editor v1.9.8.1 // Available at the Unity Asset Store - http://u3d.as/y3X Shader "TestTerrainShader" { Properties { [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1) [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5 _Float3("Float 3", Range( 0 , 2)) = 1 [HideInInspector]_Control("Control", 2D) = "white" {} [HideInInspector]_Splat3("Splat3", 2D) = "white" {} [HideInInspector]_Splat2("Splat2", 2D) = "white" {} [HideInInspector]_Splat1("Splat1", 2D) = "white" {} [HideInInspector]_Splat0("Splat0", 2D) = "white" {} [HideInInspector]_Normal0("Normal0", 2D) = "white" {} [HideInInspector]_Normal1("Normal1", 2D) = "white" {} [HideInInspector]_Normal2("Normal2", 2D) = "white" {} [HideInInspector]_Normal3("Normal3", 2D) = "white" {} [HideInInspector]_Smoothness3("Smoothness3", Range( 0 , 1)) = 1 [HideInInspector]_Smoothness1("Smoothness1", Range( 0 , 1)) = 1 [HideInInspector]_Smoothness0("Smoothness0", Range( 0 , 1)) = 1 [HideInInspector]_Smoothness2("Smoothness2", Range( 0 , 1)) = 1 [HideInInspector][Gamma]_Metallic0("Metallic0", Range( 0 , 1)) = 0 [HideInInspector][Gamma]_Metallic2("Metallic2", Range( 0 , 1)) = 0 [HideInInspector][Gamma]_Metallic3("Metallic3", Range( 0 , 1)) = 0 [HideInInspector][Gamma]_Metallic1("Metallic1", Range( 0 , 1)) = 0 [HideInInspector]_Mask2("_Mask2", 2D) = "white" {} [HideInInspector]_Mask0("_Mask0", 2D) = "white" {} [HideInInspector]_Mask1("_Mask1", 2D) = "white" {} [HideInInspector]_Mask3("_Mask3", 2D) = "white" {} [Toggle(_KEYWORD0_ON)] _Keyword0("Keyword 0", Float) = 0 _TextureAtlas1("Texture Atlas", 2DArray) = "white" {} _MaskNo("MaskNo", 2D) = "white" {} _TexNo("TexNo", 2D) = "white" {} _MaskAtlas1("Mask Atlas", 2DArray) = "white" {} _TerrainSize("TerrainSize", Vector) = (0,0,0,0) _Repeat("Repeat", Float) = 8 [HideInInspector] _texcoord( "", 2D ) = "white" {} //_TransmissionShadow( "Transmission Shadow", Range( 0, 1 ) ) = 0.5 //_TransStrength( "Trans Strength", Range( 0, 50 ) ) = 1 //_TransNormal( "Trans Normal Distortion", Range( 0, 1 ) ) = 0.5 //_TransScattering( "Trans Scattering", Range( 1, 50 ) ) = 2 //_TransDirect( "Trans Direct", Range( 0, 1 ) ) = 0.9 //_TransAmbient( "Trans Ambient", Range( 0, 1 ) ) = 0.1 //_TransShadow( "Trans Shadow", Range( 0, 1 ) ) = 0.5 //_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 [HideInInspector][ToggleOff] _SpecularHighlights("Specular Highlights", Float) = 1 [HideInInspector][ToggleOff] _EnvironmentReflections("Environment Reflections", Float) = 1 [HideInInspector][ToggleOff] _ReceiveShadows("Receive Shadows", Float) = 1.0 [HideInInspector] _QueueOffset("_QueueOffset", Float) = 0 [HideInInspector] _QueueControl("_QueueControl", Float) = -1 [HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {} [HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {} [HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {} } SubShader { LOD 0 Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Opaque" "Queue"="Geometry" "UniversalMaterialType"="Lit" } Cull Back ZWrite On ZTest LEqual Offset 0 , 0 AlphaToMask Off HLSLINCLUDE #pragma target 4.5 #pragma prefer_hlslcc gles // ensure rendering platforms toggle list is visible #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl" #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 DistanceFromPlane (float3 pos, float4 plane) { float d = dot (float4(pos,1.0f), plane); return d; } bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] ) { float4 planeTest; planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f ); planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f ); planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f ); planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(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" Tags { "LightMode"="UniversalForward" } Blend One Zero, One Zero ZWrite On ZTest LEqual Offset 0 , 0 ColorMask RGBA HLSLPROGRAM #pragma multi_compile_fragment _ALPHATEST_ON #define _NORMAL_DROPOFF_TS 1 #pragma shader_feature_local _RECEIVE_SHADOWS_OFF #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION #pragma multi_compile_instancing #pragma instancing_options renderinglayer #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE #pragma multi_compile_fog #define ASE_FOG 1 #define _NORMALMAP 1 #define ASE_VERSION 19801 #define ASE_SRP_VERSION 140011 #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS #pragma multi_compile _ EVALUATE_SH_MIXED EVALUATE_SH_VERTEX #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION #pragma multi_compile_fragment _ _SHADOWS_SOFT _SHADOWS_SOFT_LOW _SHADOWS_SOFT_MEDIUM _SHADOWS_SOFT_HIGH #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 #pragma multi_compile _ _LIGHT_LAYERS #pragma multi_compile_fragment _ _LIGHT_COOKIES #pragma multi_compile _ _FORWARD_PLUS #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING #pragma multi_compile _ SHADOWS_SHADOWMASK #pragma multi_compile _ DIRLIGHTMAP_COMBINED #pragma multi_compile _ LIGHTMAP_ON #pragma multi_compile _ DYNAMICLIGHTMAP_ON #pragma vertex vert #pragma fragment frag #if defined(_SPECULAR_SETUP) && defined(_ASE_LIGHTING_SIMPLE) #define _SPECULAR_COLOR 1 #endif #define SHADERPASS SHADERPASS_FORWARD #if ASE_SRP_VERSION >=140007 #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl" #endif #if ASE_SRP_VERSION >=140007 #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl" #endif #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl" #if ASE_SRP_VERSION >=140009 #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" #endif #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" #if defined(LOD_FADE_CROSSFADE) #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl" #endif #if defined(UNITY_INSTANCING_ENABLED) && defined(_TERRAIN_INSTANCED_PERPIXEL_NORMAL) #define ENABLE_TERRAIN_PERPIXEL_NORMAL #endif #define ASE_NEEDS_FRAG_POSITION #pragma shader_feature_local _KEYWORD0_ON #pragma multi_compile_local __ _ALPHATEST_ON #pragma shader_feature_local _MASKMAP #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45) #define ASE_SV_DEPTH SV_DepthLessEqual #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid #else #define ASE_SV_DEPTH SV_Depth #define ASE_SV_POSITION_QUALIFIERS #endif struct Attributes { float4 positionOS : POSITION; float3 normalOS : NORMAL; float4 tangentOS : TANGENT; float4 texcoord : TEXCOORD0; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct PackedVaryings { ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION; float4 clipPosV : TEXCOORD0; float4 lightmapUVOrVertexSH : TEXCOORD1; #if defined(ASE_FOG) || defined(_ADDITIONAL_LIGHTS_VERTEX) half4 fogFactorAndVertexLight : TEXCOORD2; #endif float4 tSpace0 : TEXCOORD3; float4 tSpace1 : TEXCOORD4; float4 tSpace2 : TEXCOORD5; #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) float4 shadowCoord : TEXCOORD6; #endif #if defined(DYNAMICLIGHTMAP_ON) float2 dynamicLightmapUV : TEXCOORD7; #endif float4 ase_texcoord8 : TEXCOORD8; float4 ase_texcoord9 : TEXCOORD9; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) float4 _Splat3_ST; float4 _TexelSize; float4 _Control_ST; float4 _Splat0_ST; float4 _Splat1_ST; float4 _Splat2_ST; float2 _TerrainSize; float _Smoothness1; float _Smoothness0; float _Metallic3; float _Metallic2; float _Repeat; float _Metallic0; float _Smoothness2; float _Float3; float _Metallic1; float _Smoothness3; #ifdef ASE_TRANSMISSION float _TransmissionShadow; #endif #ifdef ASE_TRANSLUCENCY float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif sampler2D _Mask2; sampler2D _Mask0; sampler2D _Mask1; sampler2D _Mask3; float4 _MaskMapRemapScale0; float4 _MaskMapRemapOffset2; float4 _MaskMapRemapScale2; float4 _MaskMapRemapScale1; float4 _MaskMapRemapOffset1; float4 _MaskMapRemapScale3; float4 _MaskMapRemapOffset3; float4 _MaskMapRemapOffset0; TEXTURE2D_ARRAY(_MaskAtlas1); sampler2D _MaskNo; SAMPLER(sampler_MaskAtlas1); sampler2D _TexNo; TEXTURE2D_ARRAY(_TextureAtlas1); SAMPLER(sampler_TextureAtlas1); sampler2D _Control; sampler2D _Normal0; sampler2D _Splat0; sampler2D _Normal1; sampler2D _Splat1; sampler2D _Normal2; sampler2D _Splat2; sampler2D _Normal3; sampler2D _Splat3; float _LayerHasMask0; float _LayerHasMask1; float _LayerHasMask2; float _LayerHasMask3; int GetTexNo48( float f ) { float idx = f * 64.0; return round(idx); } int GetTexNo47( float f ) { float idx = f * 64.0; return round(idx); } int GetTexNo46( float f ) { float idx = f * 64.0; return round(idx); } int GetTexNo50( float f ) { float idx = f * 64.0; return round(idx); } PackedVaryings VertexFunction( Attributes input ) { PackedVaryings output = (PackedVaryings)0; UNITY_SETUP_INSTANCE_ID(input); UNITY_TRANSFER_INSTANCE_ID(input, output); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); output.ase_texcoord8.xy = input.texcoord.xy; output.ase_texcoord9 = input.positionOS; //setting value to unused interpolator channels and avoid initialization warnings output.ase_texcoord8.zw = 0; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = input.positionOS.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS input.positionOS.xyz = vertexValue; #else input.positionOS.xyz += vertexValue; #endif input.normalOS = input.normalOS; input.tangentOS = input.tangentOS; VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz ); VertexNormalInputs normalInput = GetVertexNormalInputs( input.normalOS, input.tangentOS ); output.tSpace0 = float4( normalInput.normalWS, vertexInput.positionWS.x ); output.tSpace1 = float4( normalInput.tangentWS, vertexInput.positionWS.y ); output.tSpace2 = float4( normalInput.bitangentWS, vertexInput.positionWS.z ); #if defined(LIGHTMAP_ON) OUTPUT_LIGHTMAP_UV(input.texcoord1, unity_LightmapST, output.lightmapUVOrVertexSH.xy); #else OUTPUT_SH(normalInput.normalWS.xyz, output.lightmapUVOrVertexSH.xyz); #endif #if defined(DYNAMICLIGHTMAP_ON) output.dynamicLightmapUV.xy = input.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; #endif #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) output.lightmapUVOrVertexSH.zw = input.texcoord.xy; output.lightmapUVOrVertexSH.xy = input.texcoord.xy * unity_LightmapST.xy + unity_LightmapST.zw; #endif #if defined(ASE_FOG) || defined(_ADDITIONAL_LIGHTS_VERTEX) output.fogFactorAndVertexLight = 0; #if defined(ASE_FOG) && !defined(_FOG_FRAGMENT) output.fogFactorAndVertexLight.x = ComputeFogFactor(vertexInput.positionCS.z); #endif #ifdef _ADDITIONAL_LIGHTS_VERTEX half3 vertexLight = VertexLighting( vertexInput.positionWS, normalInput.normalWS ); output.fogFactorAndVertexLight.yzw = vertexLight; #endif #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) output.shadowCoord = GetShadowCoord( vertexInput ); #endif output.positionCS = vertexInput.positionCS; output.clipPosV = vertexInput.positionCS; return output; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 positionOS : INTERNALTESSPOS; float3 normalOS : NORMAL; float4 tangentOS : TANGENT; float4 texcoord : TEXCOORD0; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( Attributes input ) { VertexControl output; UNITY_SETUP_INSTANCE_ID(input); UNITY_TRANSFER_INSTANCE_ID(input, output); output.positionOS = input.positionOS; output.normalOS = input.normalOS; output.tangentOS = input.tangentOS; output.texcoord = input.texcoord; output.texcoord1 = input.texcoord1; output.texcoord2 = input.texcoord2; return output; } TessellationFactors TessellationFunction (InputPatch input) { TessellationFactors output; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; return output; } [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")] PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { Attributes output = (Attributes) 0; output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; output.tangentOS = patch[0].tangentOS * bary.x + patch[1].tangentOS * bary.y + patch[2].tangentOS * bary.z; output.texcoord = patch[0].texcoord * bary.x + patch[1].texcoord * bary.y + patch[2].texcoord * bary.z; output.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z; output.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); float phongStrength = _TessPhongStrength; output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], output); return VertexFunction(output); } #else PackedVaryings vert ( Attributes input ) { return VertexFunction( input ); } #endif half4 frag ( PackedVaryings input #ifdef ASE_DEPTH_WRITE_ON ,out float outputDepth : ASE_SV_DEPTH #endif #ifdef _WRITE_RENDERING_LAYERS , out float4 outRenderingLayers : SV_Target1 #endif ) : SV_Target { UNITY_SETUP_INSTANCE_ID(input); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); #if defined(LOD_FADE_CROSSFADE) LODFadeCrossFade( input.positionCS ); #endif #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) float2 sampleCoords = (input.lightmapUVOrVertexSH.zw / _TerrainHeightmapRecipSize.zw + 0.5f) * _TerrainHeightmapRecipSize.xy; float3 WorldNormal = TransformObjectToWorldNormal(normalize(SAMPLE_TEXTURE2D(_TerrainNormalmapTexture, sampler_TerrainNormalmapTexture, sampleCoords).rgb * 2 - 1)); float3 WorldTangent = -cross(GetObjectToWorldMatrix()._13_23_33, WorldNormal); float3 WorldBiTangent = cross(WorldNormal, -WorldTangent); #else float3 WorldNormal = normalize( input.tSpace0.xyz ); float3 WorldTangent = input.tSpace1.xyz; float3 WorldBiTangent = input.tSpace2.xyz; #endif float3 WorldPosition = float3(input.tSpace0.w,input.tSpace1.w,input.tSpace2.w); float3 WorldViewDirection = GetWorldSpaceNormalizeViewDir( WorldPosition ); float4 ShadowCoords = float4( 0, 0, 0, 0 ); float4 ClipPos = input.clipPosV; float4 ScreenPos = ComputeScreenPos( input.clipPosV ); float2 NormalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(input.positionCS); #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) ShadowCoords = input.shadowCoord; #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); #endif float2 texCoord36 = input.ase_texcoord8.xy * float2( 1,1 ) + float2( 0,0 ); float2 temp_output_35_0 = ( texCoord36 * ( _Repeat + 1.0 ) ); float2 temp_cast_0 = (0.5).xx; float2 UV238 = ( ( ( frac( temp_output_35_0 ) - temp_cast_0 ) * _Float3 ) + 0.5 ); float2 _Vector6 = float2(1,1); float2 appendResult30 = (float2(( input.ase_texcoord9.x / ( ( _TerrainSize.x - 1.0 ) + _Vector6.x ) ) , ( input.ase_texcoord9.z / ( ( _TerrainSize.y - 1.0 ) + _Vector6.y ) ))); float2 appendResult32 = (float2(0.0 , _TexelSize.w)); float2 UV34 = ( appendResult30 + appendResult32 ); float4 tex2DNode76 = tex2D( _MaskNo, UV34 ); float Mask387 = tex2DNode76.b; float Mask3Index84 = round( ( 16.0 * Mask387 ) ); float4 tex2DArrayNode97 = SAMPLE_TEXTURE2D_ARRAY( _MaskAtlas1, sampler_MaskAtlas1, UV238,Mask3Index84 ); float4 tex2DNode45 = tex2D( _TexNo, UV34 ); float f48 = tex2DNode45.a; int localGetTexNo48 = GetTexNo48( f48 ); int layer454 = localGetTexNo48; float f47 = tex2DNode45.b; int localGetTexNo47 = GetTexNo47( f47 ); int layer353 = localGetTexNo47; float f46 = tex2DNode45.g; int localGetTexNo46 = GetTexNo46( f46 ); int layer252 = localGetTexNo46; float2 texCoord39 = input.ase_texcoord8.xy * float2( 1,1 ) + float2( 0,0 ); float2 UV344 = frac( ( ( texCoord39 * ( _Repeat + 1.0 ) ) / 4.0 ) ); float f50 = tex2DNode45.r; int localGetTexNo50 = GetTexNo50( f50 ); int layer151 = localGetTexNo50; float4 MainColor63 = SAMPLE_TEXTURE2D_ARRAY( _TextureAtlas1, sampler_TextureAtlas1, UV344,(float)layer151 ); float Mask278 = tex2DNode76.g; float Mask2Index72 = round( ( Mask278 * 16.0 ) ); float4 lerpResult89 = lerp( MainColor63 , float4( SAMPLE_TEXTURE2D_ARRAY( _TextureAtlas1, sampler_TextureAtlas1, UV344,(float)layer252 ).rgb , 0.0 ) , SAMPLE_TEXTURE2D_ARRAY( _MaskAtlas1, sampler_MaskAtlas1, UV238,Mask2Index72 )); float4 ifLocalVar116 = 0; if( layer252 <= 0.0 ) ifLocalVar116 = MainColor63; else ifLocalVar116 = lerpResult89; float4 color2119 = ifLocalVar116; float4 lerpResult101 = lerp( color2119 , SAMPLE_TEXTURE2D_ARRAY( _TextureAtlas1, sampler_TextureAtlas1, UV344,(float)layer353 ) , tex2DArrayNode97); float4 ifLocalVar121 = 0; if( layer353 <= 0.0 ) ifLocalVar121 = color2119; else ifLocalVar121 = lerpResult101; float4 color3123 = ifLocalVar121; float Mask480 = tex2DNode76.a; float Mask4Index83 = round( ( 16.0 * Mask480 ) ); float4 lerpResult102 = lerp( color3123 , SAMPLE_TEXTURE2D_ARRAY( _TextureAtlas1, sampler_TextureAtlas1, UV344,(float)layer454 ) , SAMPLE_TEXTURE2D_ARRAY( _MaskAtlas1, sampler_MaskAtlas1, UV238,Mask4Index83 )); float4 ifLocalVar128 = 0; if( layer454 <= 0.0 ) ifLocalVar128 = color3123; else ifLocalVar128 = lerpResult102; float4 color3130 = ifLocalVar128; float4 break113 = color3130; float4 appendResult115 = (float4(break113.r , break113.g , break113.b , 0.0)); float4 origion133 = appendResult115; #ifdef _KEYWORD0_ON float4 staticSwitch227 = origion133; #else float4 staticSwitch227 = tex2DArrayNode97; #endif float2 uv_Control = input.ase_texcoord8.xy * _Control_ST.xy + _Control_ST.zw; float4 tex2DNode5_g11 = tex2D( _Control, uv_Control ); float dotResult20_g11 = dot( tex2DNode5_g11 , float4(1,1,1,1) ); float SplatWeight22_g11 = dotResult20_g11; float localSplatClip74_g11 = ( SplatWeight22_g11 ); float SplatWeight74_g11 = SplatWeight22_g11; { #if !defined(SHADER_API_MOBILE) && defined(TERRAIN_SPLAT_ADDPASS) clip(SplatWeight74_g11 == 0.0f ? -1 : 1); #endif } float4 SplatControl26_g11 = ( tex2DNode5_g11 / ( localSplatClip74_g11 + 0.001 ) ); float4 temp_output_59_0_g11 = SplatControl26_g11; float2 uv_Splat0 = input.ase_texcoord8.xy * _Splat0_ST.xy + _Splat0_ST.zw; float2 uv_Splat1 = input.ase_texcoord8.xy * _Splat1_ST.xy + _Splat1_ST.zw; float2 uv_Splat2 = input.ase_texcoord8.xy * _Splat2_ST.xy + _Splat2_ST.zw; float2 uv_Splat3 = input.ase_texcoord8.xy * _Splat3_ST.xy + _Splat3_ST.zw; float4 weightedBlendVar8_g11 = temp_output_59_0_g11; float4 weightedBlend8_g11 = ( weightedBlendVar8_g11.x*tex2D( _Normal0, uv_Splat0 ) + weightedBlendVar8_g11.y*tex2D( _Normal1, uv_Splat1 ) + weightedBlendVar8_g11.z*tex2D( _Normal2, uv_Splat2 ) + weightedBlendVar8_g11.w*tex2D( _Normal3, uv_Splat3 ) ); float3 temp_output_61_0_g11 = UnpackNormalScale( weightedBlend8_g11, 1.0 ); float4 appendResult55_g11 = (float4(_Metallic0 , _Metallic1 , _Metallic2 , _Metallic3)); float localComputeMasks130_g11 = ( 0.0 ); float4 masks0130_g11 = float4( 0,0,0,0 ); float4 masks1130_g11 = float4( 0,0,0,0 ); float4 masks2130_g11 = float4( 0,0,0,0 ); float4 masks3130_g11 = float4( 0,0,0,0 ); float4 appendResult135_g11 = (float4(_LayerHasMask0 , _LayerHasMask1 , _LayerHasMask2 , _LayerHasMask3)); float4 layerHasMask136_g11 = appendResult135_g11; float4 hasMask130_g11 = layerHasMask136_g11; float2 uvMask0130_g11 = uv_Splat0; float2 uvMask1130_g11 = uv_Splat1; float2 uvMask2130_g11 = uv_Splat2; float2 uvMask3130_g11 = uv_Splat3; { masks0130_g11 = 0.5h; masks1130_g11 = 0.5h; masks2130_g11 = 0.5h; masks3130_g11 = 0.5h; #ifdef _MASKMAP masks0130_g11 = lerp(masks0130_g11, SAMPLE_TEXTURE2D(_Mask0, sampler_Mask0, uvMask0130_g11), hasMask130_g11.x); masks1130_g11 = lerp(masks1130_g11, SAMPLE_TEXTURE2D(_Mask1, sampler_Mask0, uvMask1130_g11), hasMask130_g11.y); masks2130_g11 = lerp(masks2130_g11, SAMPLE_TEXTURE2D(_Mask2, sampler_Mask0, uvMask2130_g11), hasMask130_g11.z); masks3130_g11 = lerp(masks3130_g11, SAMPLE_TEXTURE2D(_Mask3, sampler_Mask0, uvMask3130_g11), hasMask130_g11.w); #endif masks0130_g11 *= _MaskMapRemapScale0.rgba; masks0130_g11 += _MaskMapRemapOffset0.rgba; masks1130_g11 *= _MaskMapRemapScale1.rgba; masks1130_g11 += _MaskMapRemapOffset1.rgba; masks2130_g11 *= _MaskMapRemapScale2.rgba; masks2130_g11 += _MaskMapRemapOffset2.rgba; masks3130_g11 *= _MaskMapRemapScale3.rgba; masks3130_g11 += _MaskMapRemapOffset3.rgba; } float4 mask0138_g11 = masks0130_g11; float4 mask1139_g11 = masks1130_g11; float4 mask2140_g11 = masks2130_g11; float4 mask3141_g11 = masks3130_g11; float4 appendResult168_g11 = (float4((mask0138_g11).x , (mask1139_g11).x , (mask2140_g11).x , (mask3141_g11).x)); float4 maskMetallic169_g11 = appendResult168_g11; float4 lerpResult202_g11 = lerp( appendResult55_g11 , maskMetallic169_g11 , layerHasMask136_g11); float dotResult53_g11 = dot( SplatControl26_g11 , lerpResult202_g11 ); float4 appendResult205_g11 = (float4(_Smoothness0 , _Smoothness1 , _Smoothness2 , _Smoothness3)); float4 tex2DNode4_g11 = tex2D( _Splat0, uv_Splat0 ); float4 tex2DNode3_g11 = tex2D( _Splat1, uv_Splat1 ); float4 tex2DNode6_g11 = tex2D( _Splat2, uv_Splat2 ); float4 tex2DNode7_g11 = tex2D( _Splat3, uv_Splat3 ); float4 appendResult206_g11 = (float4(tex2DNode4_g11.a , tex2DNode3_g11.a , tex2DNode6_g11.a , tex2DNode7_g11.a)); float4 defaultSmoothness210_g11 = ( appendResult205_g11 * appendResult206_g11 ); float4 appendResult158_g11 = (float4((mask0138_g11).w , (mask1139_g11).w , (mask2140_g11).w , (mask3141_g11).w)); float4 maskSmoothness149_g11 = appendResult158_g11; float4 lerpResult215_g11 = lerp( defaultSmoothness210_g11 , maskSmoothness149_g11 , layerHasMask136_g11); float dotResult216_g11 = dot( lerpResult215_g11 , SplatControl26_g11 ); float3 BaseColor = staticSwitch227.rgb; float3 Normal = temp_output_61_0_g11; float3 Emission = 0; float3 Specular = 0.5; float Metallic = dotResult53_g11; float Smoothness = dotResult216_g11; float Occlusion = 1; float Alpha = 1; float AlphaClipThreshold = 0.5; float AlphaClipThresholdShadow = 0.5; float3 BakedGI = 0; float3 RefractionColor = 1; float RefractionIndex = 1; float3 Transmission = 1; float3 Translucency = 1; #ifdef ASE_DEPTH_WRITE_ON float DepthValue = input.positionCS.z; #endif #ifdef _CLEARCOAT float CoatMask = 0; float CoatSmoothness = 0; #endif #ifdef _ALPHATEST_ON clip(Alpha - AlphaClipThreshold); #endif InputData inputData = (InputData)0; inputData.positionWS = WorldPosition; inputData.positionCS = input.positionCS; inputData.viewDirectionWS = WorldViewDirection; #ifdef _NORMALMAP #if _NORMAL_DROPOFF_TS inputData.normalWS = TransformTangentToWorld(Normal, half3x3(WorldTangent, WorldBiTangent, WorldNormal)); #elif _NORMAL_DROPOFF_OS inputData.normalWS = TransformObjectToWorldNormal(Normal); #elif _NORMAL_DROPOFF_WS inputData.normalWS = Normal; #endif inputData.normalWS = NormalizeNormalPerPixel(inputData.normalWS); #else inputData.normalWS = WorldNormal; #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) inputData.shadowCoord = ShadowCoords; #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) inputData.shadowCoord = TransformWorldToShadowCoord(inputData.positionWS); #else inputData.shadowCoord = float4(0, 0, 0, 0); #endif #ifdef ASE_FOG inputData.fogCoord = InitializeInputDataFog(float4(inputData.positionWS, 1.0), input.fogFactorAndVertexLight.x); #endif #ifdef _ADDITIONAL_LIGHTS_VERTEX inputData.vertexLighting = input.fogFactorAndVertexLight.yzw; #endif #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) float3 SH = SampleSH(inputData.normalWS.xyz); #else float3 SH = input.lightmapUVOrVertexSH.xyz; #endif #if defined(DYNAMICLIGHTMAP_ON) inputData.bakedGI = SAMPLE_GI(input.lightmapUVOrVertexSH.xy, input.dynamicLightmapUV.xy, SH, inputData.normalWS); #else inputData.bakedGI = SAMPLE_GI(input.lightmapUVOrVertexSH.xy, SH, inputData.normalWS); #endif #ifdef ASE_BAKEDGI inputData.bakedGI = BakedGI; #endif inputData.normalizedScreenSpaceUV = NormalizedScreenSpaceUV; inputData.shadowMask = SAMPLE_SHADOWMASK(input.lightmapUVOrVertexSH.xy); #if defined(DEBUG_DISPLAY) #if defined(DYNAMICLIGHTMAP_ON) inputData.dynamicLightmapUV = input.dynamicLightmapUV.xy; #endif #if defined(LIGHTMAP_ON) inputData.staticLightmapUV = input.lightmapUVOrVertexSH.xy; #else inputData.vertexSH = SH; #endif #endif SurfaceData surfaceData; surfaceData.albedo = BaseColor; surfaceData.metallic = saturate(Metallic); surfaceData.specular = Specular; surfaceData.smoothness = saturate(Smoothness), surfaceData.occlusion = Occlusion, surfaceData.emission = Emission, surfaceData.alpha = saturate(Alpha); surfaceData.normalTS = Normal; surfaceData.clearCoatMask = 0; surfaceData.clearCoatSmoothness = 1; #ifdef _CLEARCOAT surfaceData.clearCoatMask = saturate(CoatMask); surfaceData.clearCoatSmoothness = saturate(CoatSmoothness); #endif #ifdef _DBUFFER ApplyDecalToSurfaceData(input.positionCS, surfaceData, inputData); #endif #ifdef _ASE_LIGHTING_SIMPLE half4 color = UniversalFragmentBlinnPhong( inputData, surfaceData); #else half4 color = UniversalFragmentPBR( inputData, surfaceData); #endif #ifdef ASE_TRANSMISSION { float shadow = _TransmissionShadow; #define SUM_LIGHT_TRANSMISSION(Light)\ float3 atten = Light.color * Light.distanceAttenuation;\ atten = lerp( atten, atten * Light.shadowAttenuation, shadow );\ half3 transmission = max( 0, -dot( inputData.normalWS, Light.direction ) ) * atten * Transmission;\ color.rgb += BaseColor * transmission; SUM_LIGHT_TRANSMISSION( GetMainLight( inputData.shadowCoord ) ); #if defined(_ADDITIONAL_LIGHTS) uint meshRenderingLayers = GetMeshRenderingLayer(); uint pixelLightCount = GetAdditionalLightsCount(); #if USE_FORWARD_PLUS for (uint lightIndex = 0; lightIndex < min(URP_FP_DIRECTIONAL_LIGHTS_COUNT, MAX_VISIBLE_LIGHTS); lightIndex++) { FORWARD_PLUS_SUBTRACTIVE_LIGHT_CHECK Light light = GetAdditionalLight(lightIndex, inputData.positionWS, inputData.shadowMask); #ifdef _LIGHT_LAYERS if (IsMatchingLightLayer(light.layerMask, meshRenderingLayers)) #endif { SUM_LIGHT_TRANSMISSION( light ); } } #endif LIGHT_LOOP_BEGIN( pixelLightCount ) Light light = GetAdditionalLight(lightIndex, inputData.positionWS, inputData.shadowMask); #ifdef _LIGHT_LAYERS if (IsMatchingLightLayer(light.layerMask, meshRenderingLayers)) #endif { SUM_LIGHT_TRANSMISSION( light ); } LIGHT_LOOP_END #endif } #endif #ifdef ASE_TRANSLUCENCY { float shadow = _TransShadow; float normal = _TransNormal; float scattering = _TransScattering; float direct = _TransDirect; float ambient = _TransAmbient; float strength = _TransStrength; #define SUM_LIGHT_TRANSLUCENCY(Light)\ float3 atten = Light.color * Light.distanceAttenuation;\ atten = lerp( atten, atten * Light.shadowAttenuation, shadow );\ half3 lightDir = Light.direction + inputData.normalWS * normal;\ half VdotL = pow( saturate( dot( inputData.viewDirectionWS, -lightDir ) ), scattering );\ half3 translucency = atten * ( VdotL * direct + inputData.bakedGI * ambient ) * Translucency;\ color.rgb += BaseColor * translucency * strength; SUM_LIGHT_TRANSLUCENCY( GetMainLight( inputData.shadowCoord ) ); #if defined(_ADDITIONAL_LIGHTS) uint meshRenderingLayers = GetMeshRenderingLayer(); uint pixelLightCount = GetAdditionalLightsCount(); #if USE_FORWARD_PLUS for (uint lightIndex = 0; lightIndex < min(URP_FP_DIRECTIONAL_LIGHTS_COUNT, MAX_VISIBLE_LIGHTS); lightIndex++) { FORWARD_PLUS_SUBTRACTIVE_LIGHT_CHECK Light light = GetAdditionalLight(lightIndex, inputData.positionWS, inputData.shadowMask); #ifdef _LIGHT_LAYERS if (IsMatchingLightLayer(light.layerMask, meshRenderingLayers)) #endif { SUM_LIGHT_TRANSLUCENCY( light ); } } #endif LIGHT_LOOP_BEGIN( pixelLightCount ) Light light = GetAdditionalLight(lightIndex, inputData.positionWS, inputData.shadowMask); #ifdef _LIGHT_LAYERS if (IsMatchingLightLayer(light.layerMask, meshRenderingLayers)) #endif { SUM_LIGHT_TRANSLUCENCY( light ); } LIGHT_LOOP_END #endif } #endif #ifdef ASE_REFRACTION float4 projScreenPos = ScreenPos / ScreenPos.w; float3 refractionOffset = ( RefractionIndex - 1.0 ) * mul( UNITY_MATRIX_V, float4( WorldNormal,0 ) ).xyz * ( 1.0 - dot( WorldNormal, WorldViewDirection ) ); projScreenPos.xy += refractionOffset.xy; float3 refraction = SHADERGRAPH_SAMPLE_SCENE_COLOR( projScreenPos.xy ) * RefractionColor; color.rgb = lerp( refraction, color.rgb, color.a ); color.a = 1; #endif #ifdef ASE_FINAL_COLOR_ALPHA_MULTIPLY color.rgb *= color.a; #endif #ifdef ASE_FOG #ifdef TERRAIN_SPLAT_ADDPASS color.rgb = MixFogColor(color.rgb, half3(0,0,0), inputData.fogCoord); #else color.rgb = MixFog(color.rgb, inputData.fogCoord); #endif #endif #ifdef ASE_DEPTH_WRITE_ON outputDepth = DepthValue; #endif #ifdef _WRITE_RENDERING_LAYERS uint renderingLayers = GetMeshRenderingLayer(); outRenderingLayers = float4( EncodeMeshRenderingLayer( renderingLayers ), 0, 0, 0 ); #endif return color; } ENDHLSL } Pass { Name "ShadowCaster" Tags { "LightMode"="ShadowCaster" } ZWrite On ZTest LEqual AlphaToMask Off ColorMask 0 HLSLPROGRAM #pragma multi_compile _ALPHATEST_ON #define _NORMAL_DROPOFF_TS 1 #pragma multi_compile_instancing #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE #define ASE_FOG 1 #define _NORMALMAP 1 #define ASE_VERSION 19801 #define ASE_SRP_VERSION 140011 #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW #pragma vertex vert #pragma fragment frag #if defined(_SPECULAR_SETUP) && defined(_ASE_LIGHTING_SIMPLE) #define _SPECULAR_COLOR 1 #endif #define SHADERPASS SHADERPASS_SHADOWCASTER #if ASE_SRP_VERSION >=140007 #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl" #endif #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl" #if ASE_SRP_VERSION >=140009 #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" #endif #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" #if defined(LOD_FADE_CROSSFADE) #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl" #endif #pragma multi_compile_local __ _ALPHATEST_ON #pragma shader_feature_local _MASKMAP #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45) #define ASE_SV_DEPTH SV_DepthLessEqual #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid #else #define ASE_SV_DEPTH SV_Depth #define ASE_SV_POSITION_QUALIFIERS #endif struct Attributes { float4 positionOS : POSITION; float3 normalOS : NORMAL; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct PackedVaryings { ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION; float4 clipPosV : TEXCOORD0; float3 positionWS : TEXCOORD1; #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) float4 shadowCoord : TEXCOORD2; #endif UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) float4 _Splat3_ST; float4 _TexelSize; float4 _Control_ST; float4 _Splat0_ST; float4 _Splat1_ST; float4 _Splat2_ST; float2 _TerrainSize; float _Smoothness1; float _Smoothness0; float _Metallic3; float _Metallic2; float _Repeat; float _Metallic0; float _Smoothness2; float _Float3; float _Metallic1; float _Smoothness3; #ifdef ASE_TRANSMISSION float _TransmissionShadow; #endif #ifdef ASE_TRANSLUCENCY float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif sampler2D _Mask2; sampler2D _Mask0; sampler2D _Mask1; sampler2D _Mask3; float4 _MaskMapRemapScale0; float4 _MaskMapRemapOffset2; float4 _MaskMapRemapScale2; float4 _MaskMapRemapScale1; float4 _MaskMapRemapOffset1; float4 _MaskMapRemapScale3; float4 _MaskMapRemapOffset3; float4 _MaskMapRemapOffset0; float3 _LightDirection; float3 _LightPosition; PackedVaryings VertexFunction( Attributes input ) { PackedVaryings output; UNITY_SETUP_INSTANCE_ID(input); UNITY_TRANSFER_INSTANCE_ID(input, output); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( output ); #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = input.positionOS.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS input.positionOS.xyz = vertexValue; #else input.positionOS.xyz += vertexValue; #endif input.normalOS = input.normalOS; float3 positionWS = TransformObjectToWorld( input.positionOS.xyz ); float3 normalWS = TransformObjectToWorldDir(input.normalOS); #if _CASTING_PUNCTUAL_LIGHT_SHADOW float3 lightDirectionWS = normalize(_LightPosition - positionWS); #else float3 lightDirectionWS = _LightDirection; #endif float4 positionCS = TransformWorldToHClip(ApplyShadowBias(positionWS, normalWS, lightDirectionWS)); #if UNITY_REVERSED_Z positionCS.z = min(positionCS.z, UNITY_NEAR_CLIP_VALUE); #else positionCS.z = max(positionCS.z, UNITY_NEAR_CLIP_VALUE); #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) VertexPositionInputs vertexInput = (VertexPositionInputs)0; vertexInput.positionWS = positionWS; vertexInput.positionCS = positionCS; output.shadowCoord = GetShadowCoord( vertexInput ); #endif output.positionCS = positionCS; output.clipPosV = positionCS; output.positionWS = positionWS; return output; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 positionOS : INTERNALTESSPOS; float3 normalOS : NORMAL; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( Attributes input ) { VertexControl output; UNITY_SETUP_INSTANCE_ID(input); UNITY_TRANSFER_INSTANCE_ID(input, output); output.positionOS = input.positionOS; output.normalOS = input.normalOS; return output; } TessellationFactors TessellationFunction (InputPatch input) { TessellationFactors output; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; return output; } [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")] PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { Attributes output = (Attributes) 0; output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); float phongStrength = _TessPhongStrength; output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], output); return VertexFunction(output); } #else PackedVaryings vert ( Attributes input ) { return VertexFunction( input ); } #endif half4 frag( PackedVaryings input #ifdef ASE_DEPTH_WRITE_ON ,out float outputDepth : ASE_SV_DEPTH #endif ) : SV_Target { UNITY_SETUP_INSTANCE_ID( input ); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( input ); float3 WorldPosition = input.positionWS; float4 ShadowCoords = float4( 0, 0, 0, 0 ); float4 ClipPos = input.clipPosV; float4 ScreenPos = ComputeScreenPos( input.clipPosV ); #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) ShadowCoords = input.shadowCoord; #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); #endif #endif float Alpha = 1; float AlphaClipThreshold = 0.5; float AlphaClipThresholdShadow = 0.5; #ifdef ASE_DEPTH_WRITE_ON float DepthValue = input.positionCS.z; #endif #ifdef _ALPHATEST_ON #ifdef _ALPHATEST_SHADOW_ON clip(Alpha - AlphaClipThresholdShadow); #else clip(Alpha - AlphaClipThreshold); #endif #endif #if defined(LOD_FADE_CROSSFADE) LODFadeCrossFade( input.positionCS ); #endif #ifdef ASE_DEPTH_WRITE_ON outputDepth = DepthValue; #endif return 0; } ENDHLSL } Pass { Name "DepthOnly" Tags { "LightMode"="DepthOnly" } ZWrite On ColorMask R AlphaToMask Off HLSLPROGRAM #pragma multi_compile _ALPHATEST_ON #define _NORMAL_DROPOFF_TS 1 #pragma multi_compile_instancing #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE #define ASE_FOG 1 #define _NORMALMAP 1 #define ASE_VERSION 19801 #define ASE_SRP_VERSION 140011 #pragma vertex vert #pragma fragment frag #if defined(_SPECULAR_SETUP) && defined(_ASE_LIGHTING_SIMPLE) #define _SPECULAR_COLOR 1 #endif #define SHADERPASS SHADERPASS_DEPTHONLY #if ASE_SRP_VERSION >=140007 #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl" #endif #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl" #if ASE_SRP_VERSION >=140009 #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" #endif #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" #if defined(LOD_FADE_CROSSFADE) #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl" #endif #pragma multi_compile_local __ _ALPHATEST_ON #pragma shader_feature_local _MASKMAP #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45) #define ASE_SV_DEPTH SV_DepthLessEqual #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid #else #define ASE_SV_DEPTH SV_Depth #define ASE_SV_POSITION_QUALIFIERS #endif struct Attributes { float4 positionOS : POSITION; float3 normalOS : NORMAL; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct PackedVaryings { ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION; float4 clipPosV : TEXCOORD0; float3 positionWS : TEXCOORD1; #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) float4 shadowCoord : TEXCOORD2; #endif UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) float4 _Splat3_ST; float4 _TexelSize; float4 _Control_ST; float4 _Splat0_ST; float4 _Splat1_ST; float4 _Splat2_ST; float2 _TerrainSize; float _Smoothness1; float _Smoothness0; float _Metallic3; float _Metallic2; float _Repeat; float _Metallic0; float _Smoothness2; float _Float3; float _Metallic1; float _Smoothness3; #ifdef ASE_TRANSMISSION float _TransmissionShadow; #endif #ifdef ASE_TRANSLUCENCY float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif sampler2D _Mask2; sampler2D _Mask0; sampler2D _Mask1; sampler2D _Mask3; float4 _MaskMapRemapScale0; float4 _MaskMapRemapOffset2; float4 _MaskMapRemapScale2; float4 _MaskMapRemapScale1; float4 _MaskMapRemapOffset1; float4 _MaskMapRemapScale3; float4 _MaskMapRemapOffset3; float4 _MaskMapRemapOffset0; PackedVaryings VertexFunction( Attributes input ) { PackedVaryings output = (PackedVaryings)0; UNITY_SETUP_INSTANCE_ID(input); UNITY_TRANSFER_INSTANCE_ID(input, output); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = input.positionOS.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS input.positionOS.xyz = vertexValue; #else input.positionOS.xyz += vertexValue; #endif input.normalOS = input.normalOS; VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz ); #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) output.shadowCoord = GetShadowCoord( vertexInput ); #endif output.positionCS = vertexInput.positionCS; output.clipPosV = vertexInput.positionCS; output.positionWS = vertexInput.positionWS; return output; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 positionOS : INTERNALTESSPOS; float3 normalOS : NORMAL; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( Attributes input ) { VertexControl output; UNITY_SETUP_INSTANCE_ID(input); UNITY_TRANSFER_INSTANCE_ID(input, output); output.positionOS = input.positionOS; output.normalOS = input.normalOS; return output; } TessellationFactors TessellationFunction (InputPatch input) { TessellationFactors output; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; return output; } [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")] PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { Attributes output = (Attributes) 0; output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); float phongStrength = _TessPhongStrength; output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], output); return VertexFunction(output); } #else PackedVaryings vert ( Attributes input ) { return VertexFunction( input ); } #endif half4 frag( PackedVaryings input #ifdef ASE_DEPTH_WRITE_ON ,out float outputDepth : ASE_SV_DEPTH #endif ) : SV_Target { UNITY_SETUP_INSTANCE_ID(input); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( input ); float3 WorldPosition = input.positionWS; float4 ShadowCoords = float4( 0, 0, 0, 0 ); float4 ClipPos = input.clipPosV; float4 ScreenPos = ComputeScreenPos( input.clipPosV ); #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) ShadowCoords = input.shadowCoord; #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); #endif #endif float Alpha = 1; float AlphaClipThreshold = 0.5; #ifdef ASE_DEPTH_WRITE_ON float DepthValue = input.positionCS.z; #endif #ifdef _ALPHATEST_ON clip(Alpha - AlphaClipThreshold); #endif #if defined(LOD_FADE_CROSSFADE) LODFadeCrossFade( input.positionCS ); #endif #ifdef ASE_DEPTH_WRITE_ON outputDepth = DepthValue; #endif return 0; } ENDHLSL } Pass { Name "Meta" Tags { "LightMode"="Meta" } Cull Off HLSLPROGRAM #pragma multi_compile_fragment _ALPHATEST_ON #define _NORMAL_DROPOFF_TS 1 #define ASE_FOG 1 #define _NORMALMAP 1 #define ASE_VERSION 19801 #define ASE_SRP_VERSION 140011 #pragma shader_feature EDITOR_VISUALIZATION #pragma vertex vert #pragma fragment frag #if defined(_SPECULAR_SETUP) && defined(_ASE_LIGHTING_SIMPLE) #define _SPECULAR_COLOR 1 #endif #define SHADERPASS SHADERPASS_META #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl" #if ASE_SRP_VERSION >=140009 #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" #endif #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/MetaInput.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" #define ASE_NEEDS_FRAG_POSITION #pragma shader_feature_local _KEYWORD0_ON #pragma multi_compile_local __ _ALPHATEST_ON #pragma shader_feature_local _MASKMAP struct Attributes { float4 positionOS : POSITION; float3 normalOS : NORMAL; float4 texcoord0 : TEXCOORD0; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct PackedVaryings { float4 positionCS : SV_POSITION; #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 positionWS : TEXCOORD0; #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) float4 shadowCoord : TEXCOORD1; #endif #ifdef EDITOR_VISUALIZATION float4 VizUV : TEXCOORD2; float4 LightCoord : TEXCOORD3; #endif float4 ase_texcoord4 : TEXCOORD4; float4 ase_texcoord5 : TEXCOORD5; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) float4 _Splat3_ST; float4 _TexelSize; float4 _Control_ST; float4 _Splat0_ST; float4 _Splat1_ST; float4 _Splat2_ST; float2 _TerrainSize; float _Smoothness1; float _Smoothness0; float _Metallic3; float _Metallic2; float _Repeat; float _Metallic0; float _Smoothness2; float _Float3; float _Metallic1; float _Smoothness3; #ifdef ASE_TRANSMISSION float _TransmissionShadow; #endif #ifdef ASE_TRANSLUCENCY float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif sampler2D _Mask2; sampler2D _Mask0; sampler2D _Mask1; sampler2D _Mask3; float4 _MaskMapRemapScale0; float4 _MaskMapRemapOffset2; float4 _MaskMapRemapScale2; float4 _MaskMapRemapScale1; float4 _MaskMapRemapOffset1; float4 _MaskMapRemapScale3; float4 _MaskMapRemapOffset3; float4 _MaskMapRemapOffset0; TEXTURE2D_ARRAY(_MaskAtlas1); sampler2D _MaskNo; SAMPLER(sampler_MaskAtlas1); sampler2D _TexNo; TEXTURE2D_ARRAY(_TextureAtlas1); SAMPLER(sampler_TextureAtlas1); int GetTexNo48( float f ) { float idx = f * 64.0; return round(idx); } int GetTexNo47( float f ) { float idx = f * 64.0; return round(idx); } int GetTexNo46( float f ) { float idx = f * 64.0; return round(idx); } int GetTexNo50( float f ) { float idx = f * 64.0; return round(idx); } PackedVaryings VertexFunction( Attributes input ) { PackedVaryings output = (PackedVaryings)0; UNITY_SETUP_INSTANCE_ID(input); UNITY_TRANSFER_INSTANCE_ID(input, output); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); output.ase_texcoord4.xy = input.texcoord0.xy; output.ase_texcoord5 = input.positionOS; //setting value to unused interpolator channels and avoid initialization warnings output.ase_texcoord4.zw = 0; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = input.positionOS.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS input.positionOS.xyz = vertexValue; #else input.positionOS.xyz += vertexValue; #endif input.normalOS = input.normalOS; float3 positionWS = TransformObjectToWorld( input.positionOS.xyz ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) output.positionWS = positionWS; #endif output.positionCS = MetaVertexPosition( input.positionOS, input.texcoord1.xy, input.texcoord1.xy, unity_LightmapST, unity_DynamicLightmapST ); #ifdef EDITOR_VISUALIZATION float2 VizUV = 0; float4 LightCoord = 0; UnityEditorVizData(input.positionOS.xyz, input.texcoord0.xy, input.texcoord1.xy, input.texcoord2.xy, VizUV, LightCoord); output.VizUV = float4(VizUV, 0, 0); output.LightCoord = LightCoord; #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) VertexPositionInputs vertexInput = (VertexPositionInputs)0; vertexInput.positionWS = positionWS; vertexInput.positionCS = output.positionCS; output.shadowCoord = GetShadowCoord( vertexInput ); #endif return output; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 positionOS : INTERNALTESSPOS; float3 normalOS : NORMAL; float4 texcoord0 : TEXCOORD0; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( Attributes input ) { VertexControl output; UNITY_SETUP_INSTANCE_ID(input); UNITY_TRANSFER_INSTANCE_ID(input, output); output.positionOS = input.positionOS; output.normalOS = input.normalOS; output.texcoord0 = input.texcoord0; output.texcoord1 = input.texcoord1; output.texcoord2 = input.texcoord2; return output; } TessellationFactors TessellationFunction (InputPatch input) { TessellationFactors output; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; return output; } [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")] PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { Attributes output = (Attributes) 0; output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; output.texcoord0 = patch[0].texcoord0 * bary.x + patch[1].texcoord0 * bary.y + patch[2].texcoord0 * bary.z; output.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z; output.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); float phongStrength = _TessPhongStrength; output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], output); return VertexFunction(output); } #else PackedVaryings vert ( Attributes input ) { return VertexFunction( input ); } #endif half4 frag(PackedVaryings input ) : SV_Target { UNITY_SETUP_INSTANCE_ID(input); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( input ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 WorldPosition = input.positionWS; #endif float4 ShadowCoords = float4( 0, 0, 0, 0 ); #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) ShadowCoords = input.shadowCoord; #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); #endif #endif float2 texCoord36 = input.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 ); float2 temp_output_35_0 = ( texCoord36 * ( _Repeat + 1.0 ) ); float2 temp_cast_0 = (0.5).xx; float2 UV238 = ( ( ( frac( temp_output_35_0 ) - temp_cast_0 ) * _Float3 ) + 0.5 ); float2 _Vector6 = float2(1,1); float2 appendResult30 = (float2(( input.ase_texcoord5.x / ( ( _TerrainSize.x - 1.0 ) + _Vector6.x ) ) , ( input.ase_texcoord5.z / ( ( _TerrainSize.y - 1.0 ) + _Vector6.y ) ))); float2 appendResult32 = (float2(0.0 , _TexelSize.w)); float2 UV34 = ( appendResult30 + appendResult32 ); float4 tex2DNode76 = tex2D( _MaskNo, UV34 ); float Mask387 = tex2DNode76.b; float Mask3Index84 = round( ( 16.0 * Mask387 ) ); float4 tex2DArrayNode97 = SAMPLE_TEXTURE2D_ARRAY( _MaskAtlas1, sampler_MaskAtlas1, UV238,Mask3Index84 ); float4 tex2DNode45 = tex2D( _TexNo, UV34 ); float f48 = tex2DNode45.a; int localGetTexNo48 = GetTexNo48( f48 ); int layer454 = localGetTexNo48; float f47 = tex2DNode45.b; int localGetTexNo47 = GetTexNo47( f47 ); int layer353 = localGetTexNo47; float f46 = tex2DNode45.g; int localGetTexNo46 = GetTexNo46( f46 ); int layer252 = localGetTexNo46; float2 texCoord39 = input.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 ); float2 UV344 = frac( ( ( texCoord39 * ( _Repeat + 1.0 ) ) / 4.0 ) ); float f50 = tex2DNode45.r; int localGetTexNo50 = GetTexNo50( f50 ); int layer151 = localGetTexNo50; float4 MainColor63 = SAMPLE_TEXTURE2D_ARRAY( _TextureAtlas1, sampler_TextureAtlas1, UV344,(float)layer151 ); float Mask278 = tex2DNode76.g; float Mask2Index72 = round( ( Mask278 * 16.0 ) ); float4 lerpResult89 = lerp( MainColor63 , float4( SAMPLE_TEXTURE2D_ARRAY( _TextureAtlas1, sampler_TextureAtlas1, UV344,(float)layer252 ).rgb , 0.0 ) , SAMPLE_TEXTURE2D_ARRAY( _MaskAtlas1, sampler_MaskAtlas1, UV238,Mask2Index72 )); float4 ifLocalVar116 = 0; if( layer252 <= 0.0 ) ifLocalVar116 = MainColor63; else ifLocalVar116 = lerpResult89; float4 color2119 = ifLocalVar116; float4 lerpResult101 = lerp( color2119 , SAMPLE_TEXTURE2D_ARRAY( _TextureAtlas1, sampler_TextureAtlas1, UV344,(float)layer353 ) , tex2DArrayNode97); float4 ifLocalVar121 = 0; if( layer353 <= 0.0 ) ifLocalVar121 = color2119; else ifLocalVar121 = lerpResult101; float4 color3123 = ifLocalVar121; float Mask480 = tex2DNode76.a; float Mask4Index83 = round( ( 16.0 * Mask480 ) ); float4 lerpResult102 = lerp( color3123 , SAMPLE_TEXTURE2D_ARRAY( _TextureAtlas1, sampler_TextureAtlas1, UV344,(float)layer454 ) , SAMPLE_TEXTURE2D_ARRAY( _MaskAtlas1, sampler_MaskAtlas1, UV238,Mask4Index83 )); float4 ifLocalVar128 = 0; if( layer454 <= 0.0 ) ifLocalVar128 = color3123; else ifLocalVar128 = lerpResult102; float4 color3130 = ifLocalVar128; float4 break113 = color3130; float4 appendResult115 = (float4(break113.r , break113.g , break113.b , 0.0)); float4 origion133 = appendResult115; #ifdef _KEYWORD0_ON float4 staticSwitch227 = origion133; #else float4 staticSwitch227 = tex2DArrayNode97; #endif float3 BaseColor = staticSwitch227.rgb; float3 Emission = 0; float Alpha = 1; float AlphaClipThreshold = 0.5; #ifdef _ALPHATEST_ON clip(Alpha - AlphaClipThreshold); #endif MetaInput metaInput = (MetaInput)0; metaInput.Albedo = BaseColor; metaInput.Emission = Emission; #ifdef EDITOR_VISUALIZATION metaInput.VizUV = input.VizUV.xy; metaInput.LightCoord = input.LightCoord; #endif return UnityMetaFragment(metaInput); } ENDHLSL } Pass { Name "Universal2D" Tags { "LightMode"="Universal2D" } Blend One Zero, One Zero ZWrite On ZTest LEqual Offset 0 , 0 ColorMask RGBA HLSLPROGRAM #pragma multi_compile_fragment _ALPHATEST_ON #define _NORMAL_DROPOFF_TS 1 #define ASE_FOG 1 #define _NORMALMAP 1 #define ASE_VERSION 19801 #define ASE_SRP_VERSION 140011 #pragma vertex vert #pragma fragment frag #if defined(_SPECULAR_SETUP) && defined(_ASE_LIGHTING_SIMPLE) #define _SPECULAR_COLOR 1 #endif #define SHADERPASS SHADERPASS_2D #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl" #if ASE_SRP_VERSION >=140009 #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" #endif #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" #define ASE_NEEDS_FRAG_POSITION #pragma shader_feature_local _KEYWORD0_ON #pragma multi_compile_local __ _ALPHATEST_ON #pragma shader_feature_local _MASKMAP struct Attributes { float4 positionOS : POSITION; float3 normalOS : NORMAL; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct PackedVaryings { float4 positionCS : SV_POSITION; #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 positionWS : TEXCOORD0; #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) float4 shadowCoord : TEXCOORD1; #endif float4 ase_texcoord2 : TEXCOORD2; float4 ase_texcoord3 : TEXCOORD3; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) float4 _Splat3_ST; float4 _TexelSize; float4 _Control_ST; float4 _Splat0_ST; float4 _Splat1_ST; float4 _Splat2_ST; float2 _TerrainSize; float _Smoothness1; float _Smoothness0; float _Metallic3; float _Metallic2; float _Repeat; float _Metallic0; float _Smoothness2; float _Float3; float _Metallic1; float _Smoothness3; #ifdef ASE_TRANSMISSION float _TransmissionShadow; #endif #ifdef ASE_TRANSLUCENCY float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif sampler2D _Mask2; sampler2D _Mask0; sampler2D _Mask1; sampler2D _Mask3; float4 _MaskMapRemapScale0; float4 _MaskMapRemapOffset2; float4 _MaskMapRemapScale2; float4 _MaskMapRemapScale1; float4 _MaskMapRemapOffset1; float4 _MaskMapRemapScale3; float4 _MaskMapRemapOffset3; float4 _MaskMapRemapOffset0; TEXTURE2D_ARRAY(_MaskAtlas1); sampler2D _MaskNo; SAMPLER(sampler_MaskAtlas1); sampler2D _TexNo; TEXTURE2D_ARRAY(_TextureAtlas1); SAMPLER(sampler_TextureAtlas1); int GetTexNo48( float f ) { float idx = f * 64.0; return round(idx); } int GetTexNo47( float f ) { float idx = f * 64.0; return round(idx); } int GetTexNo46( float f ) { float idx = f * 64.0; return round(idx); } int GetTexNo50( float f ) { float idx = f * 64.0; return round(idx); } PackedVaryings VertexFunction( Attributes input ) { PackedVaryings output = (PackedVaryings)0; UNITY_SETUP_INSTANCE_ID( input ); UNITY_TRANSFER_INSTANCE_ID( input, output ); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( output ); output.ase_texcoord2.xy = input.ase_texcoord.xy; output.ase_texcoord3 = input.positionOS; //setting value to unused interpolator channels and avoid initialization warnings output.ase_texcoord2.zw = 0; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = input.positionOS.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS input.positionOS.xyz = vertexValue; #else input.positionOS.xyz += vertexValue; #endif input.normalOS = input.normalOS; VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) output.positionWS = vertexInput.positionWS; #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) output.shadowCoord = GetShadowCoord( vertexInput ); #endif output.positionCS = vertexInput.positionCS; return output; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 positionOS : INTERNALTESSPOS; float3 normalOS : NORMAL; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( Attributes input ) { VertexControl output; UNITY_SETUP_INSTANCE_ID(input); UNITY_TRANSFER_INSTANCE_ID(input, output); output.positionOS = input.positionOS; output.normalOS = input.normalOS; output.ase_texcoord = input.ase_texcoord; return output; } TessellationFactors TessellationFunction (InputPatch input) { TessellationFactors output; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; return output; } [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")] PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { Attributes output = (Attributes) 0; output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; output.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] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); float phongStrength = _TessPhongStrength; output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], output); return VertexFunction(output); } #else PackedVaryings vert ( Attributes input ) { return VertexFunction( input ); } #endif half4 frag(PackedVaryings input ) : SV_Target { UNITY_SETUP_INSTANCE_ID( input ); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( input ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 WorldPosition = input.positionWS; #endif float4 ShadowCoords = float4( 0, 0, 0, 0 ); #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) ShadowCoords = input.shadowCoord; #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); #endif #endif float2 texCoord36 = input.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 ); float2 temp_output_35_0 = ( texCoord36 * ( _Repeat + 1.0 ) ); float2 temp_cast_0 = (0.5).xx; float2 UV238 = ( ( ( frac( temp_output_35_0 ) - temp_cast_0 ) * _Float3 ) + 0.5 ); float2 _Vector6 = float2(1,1); float2 appendResult30 = (float2(( input.ase_texcoord3.x / ( ( _TerrainSize.x - 1.0 ) + _Vector6.x ) ) , ( input.ase_texcoord3.z / ( ( _TerrainSize.y - 1.0 ) + _Vector6.y ) ))); float2 appendResult32 = (float2(0.0 , _TexelSize.w)); float2 UV34 = ( appendResult30 + appendResult32 ); float4 tex2DNode76 = tex2D( _MaskNo, UV34 ); float Mask387 = tex2DNode76.b; float Mask3Index84 = round( ( 16.0 * Mask387 ) ); float4 tex2DArrayNode97 = SAMPLE_TEXTURE2D_ARRAY( _MaskAtlas1, sampler_MaskAtlas1, UV238,Mask3Index84 ); float4 tex2DNode45 = tex2D( _TexNo, UV34 ); float f48 = tex2DNode45.a; int localGetTexNo48 = GetTexNo48( f48 ); int layer454 = localGetTexNo48; float f47 = tex2DNode45.b; int localGetTexNo47 = GetTexNo47( f47 ); int layer353 = localGetTexNo47; float f46 = tex2DNode45.g; int localGetTexNo46 = GetTexNo46( f46 ); int layer252 = localGetTexNo46; float2 texCoord39 = input.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 ); float2 UV344 = frac( ( ( texCoord39 * ( _Repeat + 1.0 ) ) / 4.0 ) ); float f50 = tex2DNode45.r; int localGetTexNo50 = GetTexNo50( f50 ); int layer151 = localGetTexNo50; float4 MainColor63 = SAMPLE_TEXTURE2D_ARRAY( _TextureAtlas1, sampler_TextureAtlas1, UV344,(float)layer151 ); float Mask278 = tex2DNode76.g; float Mask2Index72 = round( ( Mask278 * 16.0 ) ); float4 lerpResult89 = lerp( MainColor63 , float4( SAMPLE_TEXTURE2D_ARRAY( _TextureAtlas1, sampler_TextureAtlas1, UV344,(float)layer252 ).rgb , 0.0 ) , SAMPLE_TEXTURE2D_ARRAY( _MaskAtlas1, sampler_MaskAtlas1, UV238,Mask2Index72 )); float4 ifLocalVar116 = 0; if( layer252 <= 0.0 ) ifLocalVar116 = MainColor63; else ifLocalVar116 = lerpResult89; float4 color2119 = ifLocalVar116; float4 lerpResult101 = lerp( color2119 , SAMPLE_TEXTURE2D_ARRAY( _TextureAtlas1, sampler_TextureAtlas1, UV344,(float)layer353 ) , tex2DArrayNode97); float4 ifLocalVar121 = 0; if( layer353 <= 0.0 ) ifLocalVar121 = color2119; else ifLocalVar121 = lerpResult101; float4 color3123 = ifLocalVar121; float Mask480 = tex2DNode76.a; float Mask4Index83 = round( ( 16.0 * Mask480 ) ); float4 lerpResult102 = lerp( color3123 , SAMPLE_TEXTURE2D_ARRAY( _TextureAtlas1, sampler_TextureAtlas1, UV344,(float)layer454 ) , SAMPLE_TEXTURE2D_ARRAY( _MaskAtlas1, sampler_MaskAtlas1, UV238,Mask4Index83 )); float4 ifLocalVar128 = 0; if( layer454 <= 0.0 ) ifLocalVar128 = color3123; else ifLocalVar128 = lerpResult102; float4 color3130 = ifLocalVar128; float4 break113 = color3130; float4 appendResult115 = (float4(break113.r , break113.g , break113.b , 0.0)); float4 origion133 = appendResult115; #ifdef _KEYWORD0_ON float4 staticSwitch227 = origion133; #else float4 staticSwitch227 = tex2DArrayNode97; #endif float3 BaseColor = staticSwitch227.rgb; float Alpha = 1; float AlphaClipThreshold = 0.5; half4 color = half4(BaseColor, Alpha ); #ifdef _ALPHATEST_ON clip(Alpha - AlphaClipThreshold); #endif return color; } ENDHLSL } Pass { Name "DepthNormals" Tags { "LightMode"="DepthNormals" } ZWrite On Blend One Zero ZTest LEqual ZWrite On HLSLPROGRAM #pragma multi_compile _ALPHATEST_ON #define _NORMAL_DROPOFF_TS 1 #pragma multi_compile_instancing #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE #define ASE_FOG 1 #define _NORMALMAP 1 #define ASE_VERSION 19801 #define ASE_SRP_VERSION 140011 #pragma vertex vert #pragma fragment frag #if defined(_SPECULAR_SETUP) && defined(_ASE_LIGHTING_SIMPLE) #define _SPECULAR_COLOR 1 #endif #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY //#define SHADERPASS SHADERPASS_DEPTHNORMALS #if ASE_SRP_VERSION >=140007 #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl" #endif #if ASE_SRP_VERSION >=140007 #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl" #endif #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl" #if ASE_SRP_VERSION >=140009 #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" #endif #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" #if defined(LOD_FADE_CROSSFADE) #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl" #endif #pragma multi_compile_local __ _ALPHATEST_ON #pragma shader_feature_local _MASKMAP #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45) #define ASE_SV_DEPTH SV_DepthLessEqual #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid #else #define ASE_SV_DEPTH SV_Depth #define ASE_SV_POSITION_QUALIFIERS #endif struct Attributes { float4 positionOS : POSITION; float3 normalOS : NORMAL; float4 tangentOS : TANGENT; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct PackedVaryings { ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION; float4 clipPosV : TEXCOORD0; float3 positionWS : TEXCOORD1; float3 normalWS : TEXCOORD2; float4 tangentWS : TEXCOORD3; #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) float4 shadowCoord : TEXCOORD4; #endif float4 ase_texcoord5 : TEXCOORD5; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) float4 _Splat3_ST; float4 _TexelSize; float4 _Control_ST; float4 _Splat0_ST; float4 _Splat1_ST; float4 _Splat2_ST; float2 _TerrainSize; float _Smoothness1; float _Smoothness0; float _Metallic3; float _Metallic2; float _Repeat; float _Metallic0; float _Smoothness2; float _Float3; float _Metallic1; float _Smoothness3; #ifdef ASE_TRANSMISSION float _TransmissionShadow; #endif #ifdef ASE_TRANSLUCENCY float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif sampler2D _Mask2; sampler2D _Mask0; sampler2D _Mask1; sampler2D _Mask3; float4 _MaskMapRemapScale0; float4 _MaskMapRemapOffset2; float4 _MaskMapRemapScale2; float4 _MaskMapRemapScale1; float4 _MaskMapRemapOffset1; float4 _MaskMapRemapScale3; float4 _MaskMapRemapOffset3; float4 _MaskMapRemapOffset0; sampler2D _Control; sampler2D _Normal0; sampler2D _Splat0; sampler2D _Normal1; sampler2D _Splat1; sampler2D _Normal2; sampler2D _Splat2; sampler2D _Normal3; sampler2D _Splat3; PackedVaryings VertexFunction( Attributes input ) { PackedVaryings output = (PackedVaryings)0; UNITY_SETUP_INSTANCE_ID(input); UNITY_TRANSFER_INSTANCE_ID(input, output); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); output.ase_texcoord5.xy = input.ase_texcoord.xy; //setting value to unused interpolator channels and avoid initialization warnings output.ase_texcoord5.zw = 0; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = input.positionOS.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS input.positionOS.xyz = vertexValue; #else input.positionOS.xyz += vertexValue; #endif input.normalOS = input.normalOS; input.tangentOS = input.tangentOS; VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz ); float3 normalWS = TransformObjectToWorldNormal( input.normalOS ); float4 tangentWS = float4( TransformObjectToWorldDir( input.tangentOS.xyz ), input.tangentOS.w ); #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) output.shadowCoord = GetShadowCoord( vertexInput ); #endif output.positionCS = vertexInput.positionCS; output.clipPosV = vertexInput.positionCS; output.positionWS = vertexInput.positionWS; output.normalWS = normalWS; output.tangentWS = tangentWS; return output; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 positionOS : INTERNALTESSPOS; float3 normalOS : NORMAL; float4 tangentOS : TANGENT; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( Attributes input ) { VertexControl output; UNITY_SETUP_INSTANCE_ID(input); UNITY_TRANSFER_INSTANCE_ID(input, output); output.positionOS = input.positionOS; output.normalOS = input.normalOS; output.tangentOS = input.tangentOS; output.ase_texcoord = input.ase_texcoord; return output; } TessellationFactors TessellationFunction (InputPatch input) { TessellationFactors output; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; return output; } [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")] PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { Attributes output = (Attributes) 0; output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; output.tangentOS = patch[0].tangentOS * bary.x + patch[1].tangentOS * bary.y + patch[2].tangentOS * bary.z; output.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] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); float phongStrength = _TessPhongStrength; output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], output); return VertexFunction(output); } #else PackedVaryings vert ( Attributes input ) { return VertexFunction( input ); } #endif void frag( PackedVaryings input , out half4 outNormalWS : SV_Target0 #ifdef ASE_DEPTH_WRITE_ON ,out float outputDepth : ASE_SV_DEPTH #endif #ifdef _WRITE_RENDERING_LAYERS , out float4 outRenderingLayers : SV_Target1 #endif ) { UNITY_SETUP_INSTANCE_ID(input); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( input ); float4 ShadowCoords = float4( 0, 0, 0, 0 ); float3 WorldNormal = input.normalWS; float4 WorldTangent = input.tangentWS; float3 WorldPosition = input.positionWS; float4 ClipPos = input.clipPosV; float4 ScreenPos = ComputeScreenPos( input.clipPosV ); #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) ShadowCoords = input.shadowCoord; #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); #endif #endif float2 uv_Control = input.ase_texcoord5.xy * _Control_ST.xy + _Control_ST.zw; float4 tex2DNode5_g11 = tex2D( _Control, uv_Control ); float dotResult20_g11 = dot( tex2DNode5_g11 , float4(1,1,1,1) ); float SplatWeight22_g11 = dotResult20_g11; float localSplatClip74_g11 = ( SplatWeight22_g11 ); float SplatWeight74_g11 = SplatWeight22_g11; { #if !defined(SHADER_API_MOBILE) && defined(TERRAIN_SPLAT_ADDPASS) clip(SplatWeight74_g11 == 0.0f ? -1 : 1); #endif } float4 SplatControl26_g11 = ( tex2DNode5_g11 / ( localSplatClip74_g11 + 0.001 ) ); float4 temp_output_59_0_g11 = SplatControl26_g11; float2 uv_Splat0 = input.ase_texcoord5.xy * _Splat0_ST.xy + _Splat0_ST.zw; float2 uv_Splat1 = input.ase_texcoord5.xy * _Splat1_ST.xy + _Splat1_ST.zw; float2 uv_Splat2 = input.ase_texcoord5.xy * _Splat2_ST.xy + _Splat2_ST.zw; float2 uv_Splat3 = input.ase_texcoord5.xy * _Splat3_ST.xy + _Splat3_ST.zw; float4 weightedBlendVar8_g11 = temp_output_59_0_g11; float4 weightedBlend8_g11 = ( weightedBlendVar8_g11.x*tex2D( _Normal0, uv_Splat0 ) + weightedBlendVar8_g11.y*tex2D( _Normal1, uv_Splat1 ) + weightedBlendVar8_g11.z*tex2D( _Normal2, uv_Splat2 ) + weightedBlendVar8_g11.w*tex2D( _Normal3, uv_Splat3 ) ); float3 temp_output_61_0_g11 = UnpackNormalScale( weightedBlend8_g11, 1.0 ); float3 Normal = temp_output_61_0_g11; float Alpha = 1; float AlphaClipThreshold = 0.5; #ifdef ASE_DEPTH_WRITE_ON float DepthValue = input.positionCS.z; #endif #ifdef _ALPHATEST_ON clip(Alpha - AlphaClipThreshold); #endif #if defined(LOD_FADE_CROSSFADE) LODFadeCrossFade( input.positionCS ); #endif #ifdef ASE_DEPTH_WRITE_ON outputDepth = DepthValue; #endif #if defined(_GBUFFER_NORMALS_OCT) float2 octNormalWS = PackNormalOctQuadEncode(WorldNormal); float2 remappedOctNormalWS = saturate(octNormalWS * 0.5 + 0.5); half3 packedNormalWS = PackFloat2To888(remappedOctNormalWS); outNormalWS = half4(packedNormalWS, 0.0); #else #if defined(_NORMALMAP) #if _NORMAL_DROPOFF_TS float crossSign = (WorldTangent.w > 0.0 ? 1.0 : -1.0) * GetOddNegativeScale(); float3 bitangent = crossSign * cross(WorldNormal.xyz, WorldTangent.xyz); float3 normalWS = TransformTangentToWorld(Normal, half3x3(WorldTangent.xyz, bitangent, WorldNormal.xyz)); #elif _NORMAL_DROPOFF_OS float3 normalWS = TransformObjectToWorldNormal(Normal); #elif _NORMAL_DROPOFF_WS float3 normalWS = Normal; #endif #else float3 normalWS = WorldNormal; #endif outNormalWS = half4(NormalizeNormalPerPixel(normalWS), 0.0); #endif #ifdef _WRITE_RENDERING_LAYERS uint renderingLayers = GetMeshRenderingLayer(); outRenderingLayers = float4(EncodeMeshRenderingLayer(renderingLayers), 0, 0, 0); #endif } ENDHLSL } Pass { Name "GBuffer" Tags { "LightMode"="UniversalGBuffer" } Blend One Zero, One Zero ZWrite On ZTest LEqual Offset 0 , 0 ColorMask RGBA HLSLPROGRAM #pragma multi_compile_fragment _ALPHATEST_ON #define _NORMAL_DROPOFF_TS 1 #pragma shader_feature_local _RECEIVE_SHADOWS_OFF #pragma multi_compile_instancing #pragma instancing_options renderinglayer #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE #pragma multi_compile_fog #define ASE_FOG 1 #define _NORMALMAP 1 #define ASE_VERSION 19801 #define ASE_SRP_VERSION 140011 #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION #pragma multi_compile_fragment _ _SHADOWS_SOFT _SHADOWS_SOFT_LOW _SHADOWS_SOFT_MEDIUM _SHADOWS_SOFT_HIGH #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 #pragma multi_compile_fragment _ _GBUFFER_NORMALS_OCT #pragma multi_compile_fragment _ _RENDER_PASS_ENABLED #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING #pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE #pragma multi_compile _ SHADOWS_SHADOWMASK #pragma multi_compile _ DIRLIGHTMAP_COMBINED #pragma multi_compile _ LIGHTMAP_ON #pragma multi_compile _ DYNAMICLIGHTMAP_ON #pragma vertex vert #pragma fragment frag #if defined(_SPECULAR_SETUP) && defined(_ASE_LIGHTING_SIMPLE) #define _SPECULAR_COLOR 1 #endif #define SHADERPASS SHADERPASS_GBUFFER #if ASE_SRP_VERSION >=140007 #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl" #endif #if ASE_SRP_VERSION >=140007 #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl" #endif #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl" #if ASE_SRP_VERSION >=140009 #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" #endif #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" #if defined(LOD_FADE_CROSSFADE) #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl" #endif #if defined(UNITY_INSTANCING_ENABLED) && defined(_TERRAIN_INSTANCED_PERPIXEL_NORMAL) #define ENABLE_TERRAIN_PERPIXEL_NORMAL #endif #define ASE_NEEDS_FRAG_POSITION #pragma shader_feature_local _KEYWORD0_ON #pragma multi_compile_local __ _ALPHATEST_ON #pragma shader_feature_local _MASKMAP #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45) #define ASE_SV_DEPTH SV_DepthLessEqual #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid #else #define ASE_SV_DEPTH SV_Depth #define ASE_SV_POSITION_QUALIFIERS #endif struct Attributes { float4 positionOS : POSITION; float3 normalOS : NORMAL; float4 tangentOS : TANGENT; float4 texcoord : TEXCOORD0; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct PackedVaryings { ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION; float4 clipPosV : TEXCOORD0; float4 lightmapUVOrVertexSH : TEXCOORD1; #if defined(ASE_FOG) || defined(_ADDITIONAL_LIGHTS_VERTEX) half4 fogFactorAndVertexLight : TEXCOORD2; #endif float4 tSpace0 : TEXCOORD3; float4 tSpace1 : TEXCOORD4; float4 tSpace2 : TEXCOORD5; #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) float4 shadowCoord : TEXCOORD6; #endif #if defined(DYNAMICLIGHTMAP_ON) float2 dynamicLightmapUV : TEXCOORD7; #endif float4 ase_texcoord8 : TEXCOORD8; float4 ase_texcoord9 : TEXCOORD9; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) float4 _Splat3_ST; float4 _TexelSize; float4 _Control_ST; float4 _Splat0_ST; float4 _Splat1_ST; float4 _Splat2_ST; float2 _TerrainSize; float _Smoothness1; float _Smoothness0; float _Metallic3; float _Metallic2; float _Repeat; float _Metallic0; float _Smoothness2; float _Float3; float _Metallic1; float _Smoothness3; #ifdef ASE_TRANSMISSION float _TransmissionShadow; #endif #ifdef ASE_TRANSLUCENCY float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif sampler2D _Mask2; sampler2D _Mask0; sampler2D _Mask1; sampler2D _Mask3; float4 _MaskMapRemapScale0; float4 _MaskMapRemapOffset2; float4 _MaskMapRemapScale2; float4 _MaskMapRemapScale1; float4 _MaskMapRemapOffset1; float4 _MaskMapRemapScale3; float4 _MaskMapRemapOffset3; float4 _MaskMapRemapOffset0; TEXTURE2D_ARRAY(_MaskAtlas1); sampler2D _MaskNo; SAMPLER(sampler_MaskAtlas1); sampler2D _TexNo; TEXTURE2D_ARRAY(_TextureAtlas1); SAMPLER(sampler_TextureAtlas1); sampler2D _Control; sampler2D _Normal0; sampler2D _Splat0; sampler2D _Normal1; sampler2D _Splat1; sampler2D _Normal2; sampler2D _Splat2; sampler2D _Normal3; sampler2D _Splat3; float _LayerHasMask0; float _LayerHasMask1; float _LayerHasMask2; float _LayerHasMask3; #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/UnityGBuffer.hlsl" int GetTexNo48( float f ) { float idx = f * 64.0; return round(idx); } int GetTexNo47( float f ) { float idx = f * 64.0; return round(idx); } int GetTexNo46( float f ) { float idx = f * 64.0; return round(idx); } int GetTexNo50( float f ) { float idx = f * 64.0; return round(idx); } PackedVaryings VertexFunction( Attributes input ) { PackedVaryings output = (PackedVaryings)0; UNITY_SETUP_INSTANCE_ID(input); UNITY_TRANSFER_INSTANCE_ID(input, output); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); output.ase_texcoord8.xy = input.texcoord.xy; output.ase_texcoord9 = input.positionOS; //setting value to unused interpolator channels and avoid initialization warnings output.ase_texcoord8.zw = 0; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = input.positionOS.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS input.positionOS.xyz = vertexValue; #else input.positionOS.xyz += vertexValue; #endif input.normalOS = input.normalOS; input.tangentOS = input.tangentOS; VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz ); VertexNormalInputs normalInput = GetVertexNormalInputs( input.normalOS, input.tangentOS ); output.tSpace0 = float4( normalInput.normalWS, vertexInput.positionWS.x); output.tSpace1 = float4( normalInput.tangentWS, vertexInput.positionWS.y); output.tSpace2 = float4( normalInput.bitangentWS, vertexInput.positionWS.z); #if defined(LIGHTMAP_ON) OUTPUT_LIGHTMAP_UV(input.texcoord1, unity_LightmapST, output.lightmapUVOrVertexSH.xy); #endif #if defined(DYNAMICLIGHTMAP_ON) output.dynamicLightmapUV.xy = input.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; #endif #if !defined(LIGHTMAP_ON) OUTPUT_SH(normalInput.normalWS.xyz, output.lightmapUVOrVertexSH.xyz); #endif #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) output.lightmapUVOrVertexSH.zw = input.texcoord.xy; output.lightmapUVOrVertexSH.xy = input.texcoord.xy * unity_LightmapST.xy + unity_LightmapST.zw; #endif #if defined(ASE_FOG) || defined(_ADDITIONAL_LIGHTS_VERTEX) output.fogFactorAndVertexLight = 0; #if defined(ASE_FOG) && !defined(_FOG_FRAGMENT) // @diogo: no fog applied in GBuffer #endif #ifdef _ADDITIONAL_LIGHTS_VERTEX half3 vertexLight = VertexLighting( vertexInput.positionWS, normalInput.normalWS ); output.fogFactorAndVertexLight.yzw = vertexLight; #endif #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) output.shadowCoord = GetShadowCoord( vertexInput ); #endif output.positionCS = vertexInput.positionCS; output.clipPosV = vertexInput.positionCS; return output; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 positionOS : INTERNALTESSPOS; float3 normalOS : NORMAL; float4 tangentOS : TANGENT; float4 texcoord : TEXCOORD0; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( Attributes input ) { VertexControl output; UNITY_SETUP_INSTANCE_ID(input); UNITY_TRANSFER_INSTANCE_ID(input, output); output.positionOS = input.positionOS; output.normalOS = input.normalOS; output.tangentOS = input.tangentOS; output.texcoord = input.texcoord; output.texcoord1 = input.texcoord1; output.texcoord2 = input.texcoord2; return output; } TessellationFactors TessellationFunction (InputPatch input) { TessellationFactors output; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; return output; } [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")] PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { Attributes output = (Attributes) 0; output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; output.tangentOS = patch[0].tangentOS * bary.x + patch[1].tangentOS * bary.y + patch[2].tangentOS * bary.z; output.texcoord = patch[0].texcoord * bary.x + patch[1].texcoord * bary.y + patch[2].texcoord * bary.z; output.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z; output.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); float phongStrength = _TessPhongStrength; output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], output); return VertexFunction(output); } #else PackedVaryings vert ( Attributes input ) { return VertexFunction( input ); } #endif FragmentOutput frag ( PackedVaryings input #ifdef ASE_DEPTH_WRITE_ON ,out float outputDepth : ASE_SV_DEPTH #endif ) { UNITY_SETUP_INSTANCE_ID(input); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); #if defined(LOD_FADE_CROSSFADE) LODFadeCrossFade( input.positionCS ); #endif #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) float2 sampleCoords = (input.lightmapUVOrVertexSH.zw / _TerrainHeightmapRecipSize.zw + 0.5f) * _TerrainHeightmapRecipSize.xy; float3 WorldNormal = TransformObjectToWorldNormal(normalize(SAMPLE_TEXTURE2D(_TerrainNormalmapTexture, sampler_TerrainNormalmapTexture, sampleCoords).rgb * 2 - 1)); float3 WorldTangent = -cross(GetObjectToWorldMatrix()._13_23_33, WorldNormal); float3 WorldBiTangent = cross(WorldNormal, -WorldTangent); #else float3 WorldNormal = normalize( input.tSpace0.xyz ); float3 WorldTangent = input.tSpace1.xyz; float3 WorldBiTangent = input.tSpace2.xyz; #endif float3 WorldPosition = float3(input.tSpace0.w,input.tSpace1.w,input.tSpace2.w); float3 WorldViewDirection = GetWorldSpaceNormalizeViewDir( WorldPosition ); float4 ShadowCoords = float4( 0, 0, 0, 0 ); float4 ClipPos = input.clipPosV; float4 ScreenPos = ComputeScreenPos( input.clipPosV ); float2 NormalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(input.positionCS); #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) ShadowCoords = input.shadowCoord; #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); #else ShadowCoords = float4(0, 0, 0, 0); #endif float2 texCoord36 = input.ase_texcoord8.xy * float2( 1,1 ) + float2( 0,0 ); float2 temp_output_35_0 = ( texCoord36 * ( _Repeat + 1.0 ) ); float2 temp_cast_0 = (0.5).xx; float2 UV238 = ( ( ( frac( temp_output_35_0 ) - temp_cast_0 ) * _Float3 ) + 0.5 ); float2 _Vector6 = float2(1,1); float2 appendResult30 = (float2(( input.ase_texcoord9.x / ( ( _TerrainSize.x - 1.0 ) + _Vector6.x ) ) , ( input.ase_texcoord9.z / ( ( _TerrainSize.y - 1.0 ) + _Vector6.y ) ))); float2 appendResult32 = (float2(0.0 , _TexelSize.w)); float2 UV34 = ( appendResult30 + appendResult32 ); float4 tex2DNode76 = tex2D( _MaskNo, UV34 ); float Mask387 = tex2DNode76.b; float Mask3Index84 = round( ( 16.0 * Mask387 ) ); float4 tex2DArrayNode97 = SAMPLE_TEXTURE2D_ARRAY( _MaskAtlas1, sampler_MaskAtlas1, UV238,Mask3Index84 ); float4 tex2DNode45 = tex2D( _TexNo, UV34 ); float f48 = tex2DNode45.a; int localGetTexNo48 = GetTexNo48( f48 ); int layer454 = localGetTexNo48; float f47 = tex2DNode45.b; int localGetTexNo47 = GetTexNo47( f47 ); int layer353 = localGetTexNo47; float f46 = tex2DNode45.g; int localGetTexNo46 = GetTexNo46( f46 ); int layer252 = localGetTexNo46; float2 texCoord39 = input.ase_texcoord8.xy * float2( 1,1 ) + float2( 0,0 ); float2 UV344 = frac( ( ( texCoord39 * ( _Repeat + 1.0 ) ) / 4.0 ) ); float f50 = tex2DNode45.r; int localGetTexNo50 = GetTexNo50( f50 ); int layer151 = localGetTexNo50; float4 MainColor63 = SAMPLE_TEXTURE2D_ARRAY( _TextureAtlas1, sampler_TextureAtlas1, UV344,(float)layer151 ); float Mask278 = tex2DNode76.g; float Mask2Index72 = round( ( Mask278 * 16.0 ) ); float4 lerpResult89 = lerp( MainColor63 , float4( SAMPLE_TEXTURE2D_ARRAY( _TextureAtlas1, sampler_TextureAtlas1, UV344,(float)layer252 ).rgb , 0.0 ) , SAMPLE_TEXTURE2D_ARRAY( _MaskAtlas1, sampler_MaskAtlas1, UV238,Mask2Index72 )); float4 ifLocalVar116 = 0; if( layer252 <= 0.0 ) ifLocalVar116 = MainColor63; else ifLocalVar116 = lerpResult89; float4 color2119 = ifLocalVar116; float4 lerpResult101 = lerp( color2119 , SAMPLE_TEXTURE2D_ARRAY( _TextureAtlas1, sampler_TextureAtlas1, UV344,(float)layer353 ) , tex2DArrayNode97); float4 ifLocalVar121 = 0; if( layer353 <= 0.0 ) ifLocalVar121 = color2119; else ifLocalVar121 = lerpResult101; float4 color3123 = ifLocalVar121; float Mask480 = tex2DNode76.a; float Mask4Index83 = round( ( 16.0 * Mask480 ) ); float4 lerpResult102 = lerp( color3123 , SAMPLE_TEXTURE2D_ARRAY( _TextureAtlas1, sampler_TextureAtlas1, UV344,(float)layer454 ) , SAMPLE_TEXTURE2D_ARRAY( _MaskAtlas1, sampler_MaskAtlas1, UV238,Mask4Index83 )); float4 ifLocalVar128 = 0; if( layer454 <= 0.0 ) ifLocalVar128 = color3123; else ifLocalVar128 = lerpResult102; float4 color3130 = ifLocalVar128; float4 break113 = color3130; float4 appendResult115 = (float4(break113.r , break113.g , break113.b , 0.0)); float4 origion133 = appendResult115; #ifdef _KEYWORD0_ON float4 staticSwitch227 = origion133; #else float4 staticSwitch227 = tex2DArrayNode97; #endif float2 uv_Control = input.ase_texcoord8.xy * _Control_ST.xy + _Control_ST.zw; float4 tex2DNode5_g11 = tex2D( _Control, uv_Control ); float dotResult20_g11 = dot( tex2DNode5_g11 , float4(1,1,1,1) ); float SplatWeight22_g11 = dotResult20_g11; float localSplatClip74_g11 = ( SplatWeight22_g11 ); float SplatWeight74_g11 = SplatWeight22_g11; { #if !defined(SHADER_API_MOBILE) && defined(TERRAIN_SPLAT_ADDPASS) clip(SplatWeight74_g11 == 0.0f ? -1 : 1); #endif } float4 SplatControl26_g11 = ( tex2DNode5_g11 / ( localSplatClip74_g11 + 0.001 ) ); float4 temp_output_59_0_g11 = SplatControl26_g11; float2 uv_Splat0 = input.ase_texcoord8.xy * _Splat0_ST.xy + _Splat0_ST.zw; float2 uv_Splat1 = input.ase_texcoord8.xy * _Splat1_ST.xy + _Splat1_ST.zw; float2 uv_Splat2 = input.ase_texcoord8.xy * _Splat2_ST.xy + _Splat2_ST.zw; float2 uv_Splat3 = input.ase_texcoord8.xy * _Splat3_ST.xy + _Splat3_ST.zw; float4 weightedBlendVar8_g11 = temp_output_59_0_g11; float4 weightedBlend8_g11 = ( weightedBlendVar8_g11.x*tex2D( _Normal0, uv_Splat0 ) + weightedBlendVar8_g11.y*tex2D( _Normal1, uv_Splat1 ) + weightedBlendVar8_g11.z*tex2D( _Normal2, uv_Splat2 ) + weightedBlendVar8_g11.w*tex2D( _Normal3, uv_Splat3 ) ); float3 temp_output_61_0_g11 = UnpackNormalScale( weightedBlend8_g11, 1.0 ); float4 appendResult55_g11 = (float4(_Metallic0 , _Metallic1 , _Metallic2 , _Metallic3)); float localComputeMasks130_g11 = ( 0.0 ); float4 masks0130_g11 = float4( 0,0,0,0 ); float4 masks1130_g11 = float4( 0,0,0,0 ); float4 masks2130_g11 = float4( 0,0,0,0 ); float4 masks3130_g11 = float4( 0,0,0,0 ); float4 appendResult135_g11 = (float4(_LayerHasMask0 , _LayerHasMask1 , _LayerHasMask2 , _LayerHasMask3)); float4 layerHasMask136_g11 = appendResult135_g11; float4 hasMask130_g11 = layerHasMask136_g11; float2 uvMask0130_g11 = uv_Splat0; float2 uvMask1130_g11 = uv_Splat1; float2 uvMask2130_g11 = uv_Splat2; float2 uvMask3130_g11 = uv_Splat3; { masks0130_g11 = 0.5h; masks1130_g11 = 0.5h; masks2130_g11 = 0.5h; masks3130_g11 = 0.5h; #ifdef _MASKMAP masks0130_g11 = lerp(masks0130_g11, SAMPLE_TEXTURE2D(_Mask0, sampler_Mask0, uvMask0130_g11), hasMask130_g11.x); masks1130_g11 = lerp(masks1130_g11, SAMPLE_TEXTURE2D(_Mask1, sampler_Mask0, uvMask1130_g11), hasMask130_g11.y); masks2130_g11 = lerp(masks2130_g11, SAMPLE_TEXTURE2D(_Mask2, sampler_Mask0, uvMask2130_g11), hasMask130_g11.z); masks3130_g11 = lerp(masks3130_g11, SAMPLE_TEXTURE2D(_Mask3, sampler_Mask0, uvMask3130_g11), hasMask130_g11.w); #endif masks0130_g11 *= _MaskMapRemapScale0.rgba; masks0130_g11 += _MaskMapRemapOffset0.rgba; masks1130_g11 *= _MaskMapRemapScale1.rgba; masks1130_g11 += _MaskMapRemapOffset1.rgba; masks2130_g11 *= _MaskMapRemapScale2.rgba; masks2130_g11 += _MaskMapRemapOffset2.rgba; masks3130_g11 *= _MaskMapRemapScale3.rgba; masks3130_g11 += _MaskMapRemapOffset3.rgba; } float4 mask0138_g11 = masks0130_g11; float4 mask1139_g11 = masks1130_g11; float4 mask2140_g11 = masks2130_g11; float4 mask3141_g11 = masks3130_g11; float4 appendResult168_g11 = (float4((mask0138_g11).x , (mask1139_g11).x , (mask2140_g11).x , (mask3141_g11).x)); float4 maskMetallic169_g11 = appendResult168_g11; float4 lerpResult202_g11 = lerp( appendResult55_g11 , maskMetallic169_g11 , layerHasMask136_g11); float dotResult53_g11 = dot( SplatControl26_g11 , lerpResult202_g11 ); float4 appendResult205_g11 = (float4(_Smoothness0 , _Smoothness1 , _Smoothness2 , _Smoothness3)); float4 tex2DNode4_g11 = tex2D( _Splat0, uv_Splat0 ); float4 tex2DNode3_g11 = tex2D( _Splat1, uv_Splat1 ); float4 tex2DNode6_g11 = tex2D( _Splat2, uv_Splat2 ); float4 tex2DNode7_g11 = tex2D( _Splat3, uv_Splat3 ); float4 appendResult206_g11 = (float4(tex2DNode4_g11.a , tex2DNode3_g11.a , tex2DNode6_g11.a , tex2DNode7_g11.a)); float4 defaultSmoothness210_g11 = ( appendResult205_g11 * appendResult206_g11 ); float4 appendResult158_g11 = (float4((mask0138_g11).w , (mask1139_g11).w , (mask2140_g11).w , (mask3141_g11).w)); float4 maskSmoothness149_g11 = appendResult158_g11; float4 lerpResult215_g11 = lerp( defaultSmoothness210_g11 , maskSmoothness149_g11 , layerHasMask136_g11); float dotResult216_g11 = dot( lerpResult215_g11 , SplatControl26_g11 ); float3 BaseColor = staticSwitch227.rgb; float3 Normal = temp_output_61_0_g11; float3 Emission = 0; float3 Specular = 0.5; float Metallic = dotResult53_g11; float Smoothness = dotResult216_g11; float Occlusion = 1; float Alpha = 1; float AlphaClipThreshold = 0.5; float AlphaClipThresholdShadow = 0.5; float3 BakedGI = 0; float3 RefractionColor = 1; float RefractionIndex = 1; float3 Transmission = 1; float3 Translucency = 1; #ifdef ASE_DEPTH_WRITE_ON float DepthValue = input.positionCS.z; #endif #ifdef _ALPHATEST_ON clip(Alpha - AlphaClipThreshold); #endif InputData inputData = (InputData)0; inputData.positionWS = WorldPosition; inputData.positionCS = input.positionCS; inputData.shadowCoord = ShadowCoords; #ifdef _NORMALMAP #if _NORMAL_DROPOFF_TS inputData.normalWS = TransformTangentToWorld(Normal, half3x3( WorldTangent, WorldBiTangent, WorldNormal )); #elif _NORMAL_DROPOFF_OS inputData.normalWS = TransformObjectToWorldNormal(Normal); #elif _NORMAL_DROPOFF_WS inputData.normalWS = Normal; #endif #else inputData.normalWS = WorldNormal; #endif inputData.normalWS = NormalizeNormalPerPixel(inputData.normalWS); inputData.viewDirectionWS = SafeNormalize( WorldViewDirection ); #ifdef ASE_FOG // @diogo: no fog applied in GBuffer #endif #ifdef _ADDITIONAL_LIGHTS_VERTEX inputData.vertexLighting = input.fogFactorAndVertexLight.yzw; #endif #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) float3 SH = SampleSH(inputData.normalWS.xyz); #else float3 SH = input.lightmapUVOrVertexSH.xyz; #endif #ifdef ASE_BAKEDGI inputData.bakedGI = BakedGI; #else #if defined(DYNAMICLIGHTMAP_ON) inputData.bakedGI = SAMPLE_GI( input.lightmapUVOrVertexSH.xy, input.dynamicLightmapUV.xy, SH, inputData.normalWS); #else inputData.bakedGI = SAMPLE_GI( input.lightmapUVOrVertexSH.xy, SH, inputData.normalWS ); #endif #endif inputData.normalizedScreenSpaceUV = NormalizedScreenSpaceUV; inputData.shadowMask = SAMPLE_SHADOWMASK(input.lightmapUVOrVertexSH.xy); #if defined(DEBUG_DISPLAY) #if defined(DYNAMICLIGHTMAP_ON) inputData.dynamicLightmapUV = input.dynamicLightmapUV.xy; #endif #if defined(LIGHTMAP_ON) inputData.staticLightmapUV = input.lightmapUVOrVertexSH.xy; #else inputData.vertexSH = SH; #endif #endif #ifdef _DBUFFER ApplyDecal(input.positionCS, BaseColor, Specular, inputData.normalWS, Metallic, Occlusion, Smoothness); #endif BRDFData brdfData; InitializeBRDFData (BaseColor, Metallic, Specular, Smoothness, Alpha, brdfData); Light mainLight = GetMainLight(inputData.shadowCoord, inputData.positionWS, inputData.shadowMask); half4 color; MixRealtimeAndBakedGI(mainLight, inputData.normalWS, inputData.bakedGI, inputData.shadowMask); color.rgb = GlobalIllumination(brdfData, inputData.bakedGI, Occlusion, inputData.positionWS, inputData.normalWS, inputData.viewDirectionWS); color.a = Alpha; #ifdef ASE_FINAL_COLOR_ALPHA_MULTIPLY color.rgb *= color.a; #endif #ifdef ASE_DEPTH_WRITE_ON outputDepth = DepthValue; #endif return BRDFDataToGbuffer(brdfData, inputData, Smoothness, Emission + color.rgb, Occlusion); } ENDHLSL } Pass { Name "SceneSelectionPass" Tags { "LightMode"="SceneSelectionPass" } Cull Off AlphaToMask Off HLSLPROGRAM #define _NORMAL_DROPOFF_TS 1 #define ASE_FOG 1 #define _NORMALMAP 1 #define ASE_VERSION 19801 #define ASE_SRP_VERSION 140011 #pragma vertex vert #pragma fragment frag #if defined(_SPECULAR_SETUP) && defined(_ASE_LIGHTING_SIMPLE) #define _SPECULAR_COLOR 1 #endif #define SCENESELECTIONPASS 1 #define ATTRIBUTES_NEED_NORMAL #define ATTRIBUTES_NEED_TANGENT #define SHADERPASS SHADERPASS_DEPTHONLY #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl" #if ASE_SRP_VERSION >=140009 #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" #endif #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #if ASE_SRP_VERSION >=140007 #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl" #endif #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" #pragma multi_compile_local __ _ALPHATEST_ON #pragma shader_feature_local _MASKMAP struct Attributes { float4 positionOS : POSITION; float3 normalOS : NORMAL; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct PackedVaryings { float4 positionCS : SV_POSITION; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) float4 _Splat3_ST; float4 _TexelSize; float4 _Control_ST; float4 _Splat0_ST; float4 _Splat1_ST; float4 _Splat2_ST; float2 _TerrainSize; float _Smoothness1; float _Smoothness0; float _Metallic3; float _Metallic2; float _Repeat; float _Metallic0; float _Smoothness2; float _Float3; float _Metallic1; float _Smoothness3; #ifdef ASE_TRANSMISSION float _TransmissionShadow; #endif #ifdef ASE_TRANSLUCENCY float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif sampler2D _Mask2; sampler2D _Mask0; sampler2D _Mask1; sampler2D _Mask3; float4 _MaskMapRemapScale0; float4 _MaskMapRemapOffset2; float4 _MaskMapRemapScale2; float4 _MaskMapRemapScale1; float4 _MaskMapRemapOffset1; float4 _MaskMapRemapScale3; float4 _MaskMapRemapOffset3; float4 _MaskMapRemapOffset0; struct SurfaceDescription { float Alpha; float AlphaClipThreshold; }; PackedVaryings VertexFunction(Attributes input ) { PackedVaryings output; ZERO_INITIALIZE(PackedVaryings, output); UNITY_SETUP_INSTANCE_ID(input); UNITY_TRANSFER_INSTANCE_ID(input, output); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = input.positionOS.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS input.positionOS.xyz = vertexValue; #else input.positionOS.xyz += vertexValue; #endif input.normalOS = input.normalOS; float3 positionWS = TransformObjectToWorld( input.positionOS.xyz ); output.positionCS = TransformWorldToHClip(positionWS); return output; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 positionOS : INTERNALTESSPOS; float3 normalOS : NORMAL; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( Attributes input ) { VertexControl output; UNITY_SETUP_INSTANCE_ID(input); UNITY_TRANSFER_INSTANCE_ID(input, output); output.positionOS = input.positionOS; output.normalOS = input.normalOS; return output; } TessellationFactors TessellationFunction (InputPatch input) { TessellationFactors output; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; return output; } [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")] PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { Attributes output = (Attributes) 0; output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); float phongStrength = _TessPhongStrength; output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], output); return VertexFunction(output); } #else PackedVaryings vert ( Attributes input ) { return VertexFunction( input ); } #endif half4 frag(PackedVaryings input ) : SV_Target { SurfaceDescription surfaceDescription = (SurfaceDescription)0; surfaceDescription.Alpha = 1; surfaceDescription.AlphaClipThreshold = 0.5; #if _ALPHATEST_ON float alphaClipThreshold = 0.01f; #if ALPHA_CLIP_THRESHOLD alphaClipThreshold = surfaceDescription.AlphaClipThreshold; #endif clip(surfaceDescription.Alpha - alphaClipThreshold); #endif half4 outColor = 0; #ifdef SCENESELECTIONPASS outColor = half4(_ObjectId, _PassValue, 1.0, 1.0); #elif defined(SCENEPICKINGPASS) outColor = _SelectionID; #endif return outColor; } ENDHLSL } Pass { Name "ScenePickingPass" Tags { "LightMode"="Picking" } AlphaToMask Off HLSLPROGRAM #define _NORMAL_DROPOFF_TS 1 #define ASE_FOG 1 #define _NORMALMAP 1 #define ASE_VERSION 19801 #define ASE_SRP_VERSION 140011 #pragma vertex vert #pragma fragment frag #if defined(_SPECULAR_SETUP) && defined(_ASE_LIGHTING_SIMPLE) #define _SPECULAR_COLOR 1 #endif #define SCENEPICKINGPASS 1 #define ATTRIBUTES_NEED_NORMAL #define ATTRIBUTES_NEED_TANGENT #define SHADERPASS SHADERPASS_DEPTHONLY #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl" #if ASE_SRP_VERSION >=140009 #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" #endif #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #if ASE_SRP_VERSION >=140007 #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl" #endif #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" #pragma multi_compile_local __ _ALPHATEST_ON #pragma shader_feature_local _MASKMAP struct Attributes { float4 positionOS : POSITION; float3 normalOS : NORMAL; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct PackedVaryings { float4 positionCS : SV_POSITION; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) float4 _Splat3_ST; float4 _TexelSize; float4 _Control_ST; float4 _Splat0_ST; float4 _Splat1_ST; float4 _Splat2_ST; float2 _TerrainSize; float _Smoothness1; float _Smoothness0; float _Metallic3; float _Metallic2; float _Repeat; float _Metallic0; float _Smoothness2; float _Float3; float _Metallic1; float _Smoothness3; #ifdef ASE_TRANSMISSION float _TransmissionShadow; #endif #ifdef ASE_TRANSLUCENCY float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif sampler2D _Mask2; sampler2D _Mask0; sampler2D _Mask1; sampler2D _Mask3; float4 _MaskMapRemapScale0; float4 _MaskMapRemapOffset2; float4 _MaskMapRemapScale2; float4 _MaskMapRemapScale1; float4 _MaskMapRemapOffset1; float4 _MaskMapRemapScale3; float4 _MaskMapRemapOffset3; float4 _MaskMapRemapOffset0; struct SurfaceDescription { float Alpha; float AlphaClipThreshold; }; PackedVaryings VertexFunction(Attributes input ) { PackedVaryings output; ZERO_INITIALIZE(PackedVaryings, output); UNITY_SETUP_INSTANCE_ID(input); UNITY_TRANSFER_INSTANCE_ID(input, output); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = input.positionOS.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS input.positionOS.xyz = vertexValue; #else input.positionOS.xyz += vertexValue; #endif input.normalOS = input.normalOS; float3 positionWS = TransformObjectToWorld( input.positionOS.xyz ); output.positionCS = TransformWorldToHClip(positionWS); return output; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 positionOS : INTERNALTESSPOS; float3 normalOS : NORMAL; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( Attributes input ) { VertexControl output; UNITY_SETUP_INSTANCE_ID(input); UNITY_TRANSFER_INSTANCE_ID(input, output); output.positionOS = input.positionOS; output.normalOS = input.normalOS; return output; } TessellationFactors TessellationFunction (InputPatch input) { TessellationFactors output; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; return output; } [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")] PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { Attributes output = (Attributes) 0; output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); float phongStrength = _TessPhongStrength; output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], output); return VertexFunction(output); } #else PackedVaryings vert ( Attributes input ) { return VertexFunction( input ); } #endif half4 frag(PackedVaryings input ) : SV_Target { SurfaceDescription surfaceDescription = (SurfaceDescription)0; surfaceDescription.Alpha = 1; surfaceDescription.AlphaClipThreshold = 0.5; #if _ALPHATEST_ON float alphaClipThreshold = 0.01f; #if ALPHA_CLIP_THRESHOLD alphaClipThreshold = surfaceDescription.AlphaClipThreshold; #endif clip(surfaceDescription.Alpha - alphaClipThreshold); #endif half4 outColor = 0; #ifdef SCENESELECTIONPASS outColor = half4(_ObjectId, _PassValue, 1.0, 1.0); #elif defined(SCENEPICKINGPASS) outColor = _SelectionID; #endif return outColor; } ENDHLSL } } CustomEditor "UnityEditor.ShaderGraphLitGUI" FallBack "Hidden/Shader Graph/FallbackError" Fallback Off } /*ASEBEGIN Version=19801 Node;AmplifyShaderEditor.CommentaryNode;21;-3622.998,-1004.435;Inherit;False;1188;611;UV1;12;34;33;32;31;30;29;28;27;26;25;24;180;;1,1,1,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;22;-3702.998,3.565186;Inherit;False;916;352;UV3;6;44;43;42;41;40;39;;1,1,1,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;18;-5062.998,-12.43481;Inherit;False;1108;355;ColorLayers;10;54;53;52;51;50;49;48;47;46;45;;1,1,1,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;20;-3600,-384;Inherit;False;1483.515;412.7217;UV2;5;37;35;207;208;210;;1,1,1,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;17;-5184.007,547.5652;Inherit;False;1359.009;539.2149;Masks;18;87;86;85;84;83;82;81;80;79;78;77;72;71;62;61;60;59;76;;1,1,1,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;19;-2726.998,19.56519;Inherit;False;853.0714;283;MainColor;5;67;66;65;64;63;;1,1,1,1;0;0 Node;AmplifyShaderEditor.Vector2Node;162;-2192,3504;Inherit;False;Property;_TerrainSize;TerrainSize;38;0;Create;False;0;0;0;False;0;False;0,0;0,0;0;3;FLOAT2;0;FLOAT;1;FLOAT;2 Node;AmplifyShaderEditor.Vector2Node;24;-3584,-736;Float;False;Constant;_Vector6;Vector 0;6;0;Create;True;0;0;0;False;0;False;1,1;0,0;0;3;FLOAT2;0;FLOAT;1;FLOAT;2 Node;AmplifyShaderEditor.SimpleSubtractOpNode;211;-2400,2928;Inherit;False;2;0;FLOAT;1;False;1;FLOAT;1;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleSubtractOpNode;212;-2256,2976;Inherit;False;2;0;FLOAT;1;False;1;FLOAT;1;False;1;FLOAT;0 Node;AmplifyShaderEditor.PosVertexDataNode;27;-3584,-960;Inherit;False;1;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SimpleAddOpNode;26;-3328,-720;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleAddOpNode;25;-3248,-848;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.TexelSizeNode;33;-3168,-592;Inherit;False;4;Create;1;0;SAMPLER2D;;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SimpleDivideOpNode;29;-3142.998,-716.4348;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleDivideOpNode;28;-3142.998,-908.4348;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.DynamicAppendNode;32;-2960,-672;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.DynamicAppendNode;30;-2992,-832;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.SimpleAddOpNode;31;-2822.998,-764.4348;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.RangedFloatNode;161;-2608,3360;Inherit;False;Property;_Repeat;Repeat;39;0;Create;False;0;0;0;False;0;False;8;8;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;34;-2678.998,-796.4348;Float;False;UV;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;39;-3654.998,51.56519;Inherit;False;0;-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.SimpleAddOpNode;213;-2800,2800;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;36;-4480,-352;Inherit;False;0;-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.SimpleAddOpNode;214;-2656,2816;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0 Node;AmplifyShaderEditor.TexturePropertyNode;160;-1808,3216;Inherit;True;Property;_MaskNo;MaskNo;35;0;Create;True;0;0;0;False;0;False;None;None;False;white;LockedToTexture2D;Texture2D;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1 Node;AmplifyShaderEditor.TexturePropertyNode;159;-1888,2944;Inherit;True;Property;_TexNo;TexNo;36;0;Create;True;0;0;0;False;0;False;None;None;False;white;LockedToTexture2D;Texture2D;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1 Node;AmplifyShaderEditor.GetLocalVarNode;75;-5440,736;Inherit;False;34;UV;1;0;OBJECT;;False;1;FLOAT2;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;41;-3414.998,83.56519;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.GetLocalVarNode;49;-5008,80;Inherit;False;34;UV;1;0;OBJECT;;False;1;FLOAT2;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;35;-3296,-304;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.RangedFloatNode;43;-3424,256;Inherit;False;Constant;_Float10;Float 0;7;0;Create;True;0;0;0;False;0;False;4;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SamplerNode;76;-5120,784;Inherit;True;Property;_TextureSample0;Texture Sample 0;32;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;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 Node;AmplifyShaderEditor.SamplerNode;45;-4806.998,51.56519;Inherit;True;Property;_TextureSample1;Texture Sample 1;31;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;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 Node;AmplifyShaderEditor.SimpleDivideOpNode;42;-3264,144;Inherit;False;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.FractNode;37;-3008,-304;Inherit;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.RangedFloatNode;223;-2240,-480;Inherit;False;Constant;_Float4;Float 0;0;0;Create;True;0;0;0;False;0;False;0.5;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.TexturePropertyNode;157;-1936,2576;Inherit;True;Property;_TextureAtlas1;Texture Atlas;34;0;Create;True;0;0;0;False;0;False;None;295c0ae04593fa347bde8dd13d6dccd8;False;white;LockedToTexture2DArray;Texture2DArray;-1;0;2;SAMPLER2DARRAY;0;SAMPLERSTATE;1 Node;AmplifyShaderEditor.RangedFloatNode;79;-4630.998,771.5652;Inherit;False;Constant;_Float11;Float 1;7;0;Create;True;0;0;0;False;0;False;16;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;78;-4662.998,675.5652;Inherit;False;Mask2;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.CustomExpressionNode;50;-4390.998,35.56519;Inherit;False;float idx = f * 64.0@$return round(idx)@;0;Create;1;True;f;FLOAT;0;In;;Inherit;False;GetTexNo;True;False;0;;False;1;0;FLOAT;0;False;1;INT;0 Node;AmplifyShaderEditor.FractNode;40;-3152,96;Inherit;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.SimpleSubtractOpNode;220;-2096,-592;Inherit;False;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.RangedFloatNode;221;-2288,-384;Inherit;False;Property;_Float3;Float 3;5;0;Create;True;0;0;0;False;0;False;1;1;0;2;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;62;-4342.998,675.5652;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;55;-1392,2480;Inherit;False;TextureAtlas;-1;True;1;0;SAMPLER2DARRAY;;False;1;SAMPLER2DARRAY;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;51;-4198.998,35.56519;Inherit;False;layer1;-1;True;1;0;INT;0;False;1;INT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;44;-2992,96;Inherit;False;UV3;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;222;-1952,-544;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.TexturePropertyNode;158;-1920,2768;Inherit;True;Property;_MaskAtlas1;Mask Atlas;37;0;Create;True;0;0;0;False;0;False;None;89e492959239b36498c4753887c45777;False;white;LockedToTexture2DArray;Texture2DArray;-1;0;2;SAMPLER2DARRAY;0;SAMPLERSTATE;1 Node;AmplifyShaderEditor.RoundOpNode;61;-4198.998,675.5652;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;65;-2662.998,195.5652;Inherit;False;51;layer1;1;0;OBJECT;;False;1;INT;0 Node;AmplifyShaderEditor.GetLocalVarNode;66;-2662.998,51.56519;Inherit;False;55;TextureAtlas;1;0;OBJECT;;False;1;SAMPLER2DARRAY;0 Node;AmplifyShaderEditor.CustomExpressionNode;46;-4390.998,99.56519;Inherit;False;float idx = f * 64.0@$return round(idx)@;0;Create;1;True;f;FLOAT;0;In;;Inherit;False;GetTexNo;True;False;0;;False;1;0;FLOAT;0;False;1;INT;0 Node;AmplifyShaderEditor.GetLocalVarNode;64;-2662.998,115.5652;Inherit;False;44;UV3;1;0;OBJECT;;False;1;FLOAT2;0 Node;AmplifyShaderEditor.SimpleAddOpNode;224;-1840,-448;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;72;-4054.998,675.5652;Inherit;False;Mask2Index;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;56;-1392,2592;Inherit;False;Mask Atlas;-1;True;1;0;SAMPLER2DARRAY;;False;1;SAMPLER2DARRAY;0 Node;AmplifyShaderEditor.SamplerNode;67;-2454.998,67.56519;Inherit;True;Property;_mainText;mainText;0;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;LockedToTexture2DArray;False;Object;-1;Auto;Texture2DArray;8;0;SAMPLER2DARRAY;;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;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 Node;AmplifyShaderEditor.RegisterLocalVarNode;52;-4198.998,99.56519;Inherit;False;layer2;-1;True;1;0;INT;0;False;1;INT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;38;-2080,-272;Float;True;UV2;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.GetLocalVarNode;70;-3254.998,835.5652;Inherit;False;56;Mask Atlas;1;0;OBJECT;;False;1;SAMPLER2DARRAY;0 Node;AmplifyShaderEditor.GetLocalVarNode;91;-3248,992;Inherit;False;72;Mask2Index;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;92;-3504,880;Inherit;True;38;UV2;1;0;OBJECT;;False;1;FLOAT2;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;63;-2118.998,99.56519;Inherit;False;MainColor;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;87;-4646.998,883.5652;Inherit;False;Mask3;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;74;-3286.998,595.5652;Inherit;False;55;TextureAtlas;1;0;OBJECT;;False;1;SAMPLER2DARRAY;0 Node;AmplifyShaderEditor.GetLocalVarNode;73;-3280,656;Inherit;False;44;UV3;1;0;OBJECT;;False;1;FLOAT2;0 Node;AmplifyShaderEditor.GetLocalVarNode;90;-3280,736;Inherit;False;52;layer2;1;0;OBJECT;;False;1;INT;0 Node;AmplifyShaderEditor.GetLocalVarNode;88;-2966.998,483.5652;Inherit;False;63;MainColor;1;0;OBJECT;;False;1;COLOR;0 Node;AmplifyShaderEditor.SamplerNode;68;-3078.998,611.5652;Inherit;True;Property;_mainText1;mainText;0;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;LockedToTexture2DArray;False;Object;-1;Auto;Texture2DArray;8;0;SAMPLER2DARRAY;;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;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;86;-4342.998,835.5652;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SamplerNode;69;-3062.998,867.5652;Inherit;True;Property;_Mask;Mask;1;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;LockedToTexture2DArray;False;Object;-1;Auto;Texture2DArray;8;0;SAMPLER2DARRAY;;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;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 Node;AmplifyShaderEditor.CustomExpressionNode;47;-4390.998,163.5652;Inherit;False;float idx = f * 64.0@$return round(idx)@;0;Create;1;True;f;FLOAT;0;In;;Inherit;False;GetTexNo;True;False;0;;False;1;0;FLOAT;0;False;1;INT;0 Node;AmplifyShaderEditor.LerpOp;89;-2630.998,675.5652;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.GetLocalVarNode;117;-2752,368;Inherit;False;52;layer2;1;0;OBJECT;;False;1;INT;0 Node;AmplifyShaderEditor.RoundOpNode;85;-4182.998,835.5652;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;53;-4198.998,163.5652;Inherit;False;layer3;-1;True;1;0;INT;0;False;1;INT;0 Node;AmplifyShaderEditor.ConditionalIfNode;116;-2496,432;Inherit;False;False;5;0;INT;0;False;1;FLOAT;0;False;2;COLOR;0,0,0,0;False;3;COLOR;0,0,0,0;False;4;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;84;-4038.998,835.5652;Inherit;False;Mask3Index;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;80;-4646.998,963.5652;Inherit;False;Mask4;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;119;-2304,432;Inherit;False;color2;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.GetLocalVarNode;94;-3264,1136;Inherit;False;55;TextureAtlas;1;0;OBJECT;;False;1;SAMPLER2DARRAY;0 Node;AmplifyShaderEditor.GetLocalVarNode;100;-3264,1504;Inherit;False;84;Mask3Index;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;99;-3264,1280;Inherit;False;53;layer3;1;0;OBJECT;;False;1;INT;0 Node;AmplifyShaderEditor.GetLocalVarNode;98;-3264,1360;Inherit;False;56;Mask Atlas;1;0;OBJECT;;False;1;SAMPLER2DARRAY;0 Node;AmplifyShaderEditor.GetLocalVarNode;96;-3264,1440;Inherit;False;38;UV2;1;0;OBJECT;;False;1;FLOAT2;0 Node;AmplifyShaderEditor.GetLocalVarNode;93;-3264,1200;Inherit;False;44;UV3;1;0;OBJECT;;False;1;FLOAT2;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;81;-4342.998,931.5652;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SamplerNode;95;-3056,1152;Inherit;True;Property;_mainText2;mainText;0;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;LockedToTexture2DArray;False;Object;-1;Auto;Texture2DArray;8;0;SAMPLER2DARRAY;;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;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 Node;AmplifyShaderEditor.GetLocalVarNode;126;-2752,1120;Inherit;False;119;color2;1;0;OBJECT;;False;1;COLOR;0 Node;AmplifyShaderEditor.SamplerNode;97;-3056,1376;Inherit;True;Property;_mainText3;mainText;0;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;LockedToTexture2DArray;False;Object;-1;Auto;Texture2DArray;8;0;SAMPLER2DARRAY;;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;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 Node;AmplifyShaderEditor.CustomExpressionNode;48;-4390.998,227.5652;Inherit;False;float idx = f * 64.0@$return round(idx)@;0;Create;1;True;f;FLOAT;0;In;;Inherit;False;GetTexNo;True;False;0;;False;1;0;FLOAT;0;False;1;INT;0 Node;AmplifyShaderEditor.RoundOpNode;82;-4198.998,931.5652;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.LerpOp;101;-2544,1216;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.GetLocalVarNode;120;-2512,1136;Inherit;False;53;layer3;1;0;OBJECT;;False;1;INT;0 Node;AmplifyShaderEditor.GetLocalVarNode;124;-2512,1360;Inherit;False;119;color2;1;0;OBJECT;;False;1;COLOR;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;54;-4198.998,227.5652;Inherit;False;layer4;-1;True;1;0;INT;0;False;1;INT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;83;-4038.998,931.5652;Inherit;False;Mask4Index;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.ConditionalIfNode;121;-2288,1184;Inherit;False;False;5;0;INT;0;False;1;FLOAT;0;False;2;COLOR;0,0,0,0;False;3;COLOR;0,0,0,0;False;4;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;123;-2192,1040;Inherit;False;color3;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.GetLocalVarNode;104;-2854.998,1651.565;Inherit;False;55;TextureAtlas;1;0;OBJECT;;False;1;SAMPLER2DARRAY;0 Node;AmplifyShaderEditor.GetLocalVarNode;105;-2864,1712;Inherit;False;44;UV3;1;0;OBJECT;;False;1;FLOAT2;0 Node;AmplifyShaderEditor.GetLocalVarNode;110;-2870.998,2019.565;Inherit;False;83;Mask4Index;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;109;-2854.998,1939.565;Inherit;False;38;UV2;1;0;OBJECT;;False;1;FLOAT2;0 Node;AmplifyShaderEditor.GetLocalVarNode;108;-2838.998,1875.565;Inherit;False;56;Mask Atlas;1;0;OBJECT;;False;1;SAMPLER2DARRAY;0 Node;AmplifyShaderEditor.GetLocalVarNode;106;-2886.998,1795.565;Inherit;False;54;layer4;1;0;OBJECT;;False;1;INT;0 Node;AmplifyShaderEditor.SamplerNode;103;-2662.998,1683.565;Inherit;True;Property;_Mask4;Mask;1;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;LockedToTexture2DArray;False;Object;-1;Auto;Texture2DArray;8;0;SAMPLER2DARRAY;;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;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 Node;AmplifyShaderEditor.SamplerNode;107;-2646.998,1907.565;Inherit;True;Property;_Mask5;Mask;1;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;LockedToTexture2DArray;False;Object;-1;Auto;Texture2DArray;8;0;SAMPLER2DARRAY;;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;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 Node;AmplifyShaderEditor.GetLocalVarNode;127;-2208,1408;Inherit;False;123;color3;1;0;OBJECT;;False;1;COLOR;0 Node;AmplifyShaderEditor.GetLocalVarNode;131;-2000,1584;Inherit;False;123;color3;1;0;OBJECT;;False;1;COLOR;0 Node;AmplifyShaderEditor.LerpOp;102;-1984,1408;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.GetLocalVarNode;129;-1952,1280;Inherit;False;54;layer4;1;0;OBJECT;;False;1;INT;0 Node;AmplifyShaderEditor.ConditionalIfNode;128;-1760,1312;Inherit;False;False;5;0;INT;0;False;1;FLOAT;0;False;2;COLOR;0,0,0,0;False;3;COLOR;0,0,0,0;False;4;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;130;-1600,1632;Inherit;False;color3;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.BreakToComponentsNode;113;-1392,1632;Inherit;False;COLOR;1;0;COLOR;0,0,0,0;False;16;FLOAT;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT;5;FLOAT;6;FLOAT;7;FLOAT;8;FLOAT;9;FLOAT;10;FLOAT;11;FLOAT;12;FLOAT;13;FLOAT;14;FLOAT;15 Node;AmplifyShaderEditor.DynamicAppendNode;115;-1264,1632;Inherit;False;FLOAT4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT4;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;133;-1040,1632;Inherit;False;origion;-1;True;1;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0 Node;AmplifyShaderEditor.RangedFloatNode;208;-3328,-160;Inherit;False;Constant;_Float5;Float 5;13;0;Create;True;0;0;0;False;0;False;0.08;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;204;-1504,2944;Inherit;False;Property;_UVZoon;UVZoon;32;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;180;-3312,-1200;Inherit;True;0;-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;182;-3072,-1056;Inherit;False;Property;_Float0;Float 0;33;0;Create;True;0;0;0;False;0;False;0.99;-6.32;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;181;-2992,-1168;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0.99;False;1;FLOAT2;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;179;-5200,672;Inherit;False;0;-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.PosVertexDataNode;174;-4208,-752;Inherit;False;0;0;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.TexelSizeNode;177;-4192,-560;Inherit;False;4;Create;1;0;SAMPLER2D;;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.DynamicAppendNode;176;-3904,-624;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.DynamicAppendNode;175;-3904,-736;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.SimpleAddOpNode;178;-3744,-656;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;59;-4342.998,579.5652;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RoundOpNode;60;-4198.998,579.5652;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;71;-4054.998,595.5652;Inherit;False;Mask1Index;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;77;-4662.998,595.5652;Inherit;False;Mask1;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.FunctionNode;1;-1360,3856;Inherit;True;Four Splats First Pass Terrain;7;;11;37452fdfb732e1443b7e39720d05b708;2,102,1,85,0;7;59;FLOAT4;0,0,0,0;False;60;FLOAT4;0,0,0,0;False;61;FLOAT3;0,0,0;False;57;FLOAT;0;False;58;FLOAT;0;False;201;FLOAT;0;False;62;FLOAT;0;False;7;FLOAT4;0;FLOAT3;14;FLOAT;56;FLOAT;45;FLOAT;200;FLOAT;19;FLOAT3;17 Node;AmplifyShaderEditor.TextureCoordinatesNode;194;-4944,1664;Inherit;True;0;-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.SimpleMultiplyOpNode;195;-4624,1648;Inherit;True;2;2;0;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 Node;AmplifyShaderEditor.RangedFloatNode;196;-4816,1984;Inherit;False;Constant;_Float1;Float 1;10;0;Create;True;0;0;0;False;0;False;1.1;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;210;-3152,-80;Inherit;False;Constant;_Float6;Float 6;13;0;Create;True;0;0;0;False;0;False;0.1;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleSubtractOpNode;207;-3136,-272;Inherit;False;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.StaticSwitch;227;-848,3536;Inherit;False;Property;_Keyword0;Keyword 0;31;0;Create;True;0;0;0;False;0;False;0;0;0;True;;Toggle;2;Key0;Key1;Create;True;True;All;9;1;COLOR;0,0,0,0;False;0;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;3;COLOR;0,0,0,0;False;4;COLOR;0,0,0,0;False;5;COLOR;0,0,0,0;False;6;COLOR;0,0,0,0;False;7;COLOR;0,0,0,0;False;8;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.LerpOp;135;-928,3696;Inherit;False;3;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0,0,0,0;False;2;FLOAT4;0,0,0,0;False;1;FLOAT4;0 Node;AmplifyShaderEditor.FunctionNode;225;-1344,3008;Inherit;False;TerrainFun;-1;;12;edbc8b3738bf4f3408088b56c3cfd812;0;7;434;FLOAT;1;False;417;SAMPLER2DARRAY;0;False;416;SAMPLER2DARRAY;0;False;419;SAMPLER2D;0;False;420;SAMPLER2D;0;False;418;FLOAT;8;False;415;FLOAT2;0,0;False;1;FLOAT4;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;228;-656,3776;Float;False;False;-1;3;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;ExtraPrePass;0;0;ExtraPrePass;5;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;5;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;0;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;229;-656,3776;Float;False;True;-1;3;UnityEditor.ShaderGraphLitGUI;0;12;TestTerrainShader;94348b07e5e8bab40bd6c8a1e3df54cd;True;Forward;0;1;Forward;21;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;5;True;12;all;0;False;True;1;1;False;;0;False;;1;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForward;False;False;0;;0;0;Standard;43;Lighting Model;0;0;Workflow;1;0;Surface;0;0; Refraction Model;0;0; Blend;0;0;Two Sided;1;0;Alpha Clipping;1;0; Use Shadow Threshold;0;0;Fragment Normal Space,InvertActionOnDeselection;0;0;Forward Only;0;0;Transmission;0;0; Transmission Shadow;0.5,False,;0;Translucency;0;0; Translucency Strength;1,False,;0; Normal Distortion;0.5,False,;0; Scattering;2,False,;0; Direct;0.9,False,;0; Ambient;0.1,False,;0; Shadow;0.5,False,;0;Cast Shadows;1;0;Receive Shadows;1;0;Receive SSAO;1;0;GPU Instancing;1;0;LOD CrossFade;1;0;Built-in Fog;1;0;_FinalColorxAlpha;0;0;Meta Pass;1;0;Override Baked GI;0;0;Extra Pre Pass;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,;0; Type;0;0; Tess;16,False,;0; Min;10,False,;0; Max;25,False,;0; Edge Length;16,False,;0; Max Displacement;25,False,;0;Write Depth;0;0; Early Z;0;0;Vertex Position,InvertActionOnDeselection;1;0;Debug Display;0;0;Clear Coat;0;0;0;10;False;True;True;True;True;True;True;True;True;True;False;;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;230;-656,3776;Float;False;False;-1;3;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=ShadowCaster;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;231;-656,3776;Float;False;False;-1;3;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;True;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;False;False;True;1;LightMode=DepthOnly;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;232;-656,3776;Float;False;False;-1;3;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;233;-656,3776;Float;False;False;-1;3;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;5;True;12;all;0;False;True;1;1;False;;0;False;;1;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=Universal2D;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;234;-656,3776;Float;False;False;-1;3;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;DepthNormals;0;6;DepthNormals;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;5;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;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;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormals;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;235;-656,3776;Float;False;False;-1;3;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;GBuffer;0;7;GBuffer;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;5;True;12;all;0;False;True;1;1;False;;0;False;;1;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalGBuffer;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;236;-656,3776;Float;False;False;-1;3;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;SceneSelectionPass;0;8;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;237;-656,3776;Float;False;False;-1;3;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;ScenePickingPass;0;9;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;;0;0;Standard;0;False;0 WireConnection;211;0;162;2 WireConnection;212;0;162;1 WireConnection;26;0;211;0 WireConnection;26;1;24;2 WireConnection;25;0;212;0 WireConnection;25;1;24;1 WireConnection;29;0;27;3 WireConnection;29;1;26;0 WireConnection;28;0;27;1 WireConnection;28;1;25;0 WireConnection;32;1;33;4 WireConnection;30;0;28;0 WireConnection;30;1;29;0 WireConnection;31;0;30;0 WireConnection;31;1;32;0 WireConnection;34;0;31;0 WireConnection;213;0;161;0 WireConnection;214;0;161;0 WireConnection;41;0;39;0 WireConnection;41;1;213;0 WireConnection;35;0;36;0 WireConnection;35;1;214;0 WireConnection;76;0;160;0 WireConnection;76;1;75;0 WireConnection;45;0;159;0 WireConnection;45;1;49;0 WireConnection;42;0;41;0 WireConnection;42;1;43;0 WireConnection;37;0;35;0 WireConnection;78;0;76;2 WireConnection;50;0;45;1 WireConnection;40;0;42;0 WireConnection;220;0;37;0 WireConnection;220;1;223;0 WireConnection;62;0;78;0 WireConnection;62;1;79;0 WireConnection;55;0;157;0 WireConnection;51;0;50;0 WireConnection;44;0;40;0 WireConnection;222;0;220;0 WireConnection;222;1;221;0 WireConnection;61;0;62;0 WireConnection;46;0;45;2 WireConnection;224;0;222;0 WireConnection;224;1;223;0 WireConnection;72;0;61;0 WireConnection;56;0;158;0 WireConnection;67;0;66;0 WireConnection;67;1;64;0 WireConnection;67;6;65;0 WireConnection;52;0;46;0 WireConnection;38;0;224;0 WireConnection;63;0;67;0 WireConnection;87;0;76;3 WireConnection;68;0;74;0 WireConnection;68;1;73;0 WireConnection;68;6;90;0 WireConnection;86;0;79;0 WireConnection;86;1;87;0 WireConnection;69;0;70;0 WireConnection;69;1;92;0 WireConnection;69;6;91;0 WireConnection;47;0;45;3 WireConnection;89;0;88;0 WireConnection;89;1;68;5 WireConnection;89;2;69;0 WireConnection;85;0;86;0 WireConnection;53;0;47;0 WireConnection;116;0;117;0 WireConnection;116;2;89;0 WireConnection;116;3;88;0 WireConnection;116;4;88;0 WireConnection;84;0;85;0 WireConnection;80;0;76;4 WireConnection;119;0;116;0 WireConnection;81;0;79;0 WireConnection;81;1;80;0 WireConnection;95;0;94;0 WireConnection;95;1;93;0 WireConnection;95;6;99;0 WireConnection;97;0;98;0 WireConnection;97;1;96;0 WireConnection;97;6;100;0 WireConnection;48;0;45;4 WireConnection;82;0;81;0 WireConnection;101;0;126;0 WireConnection;101;1;95;0 WireConnection;101;2;97;0 WireConnection;54;0;48;0 WireConnection;83;0;82;0 WireConnection;121;0;120;0 WireConnection;121;2;101;0 WireConnection;121;3;124;0 WireConnection;121;4;124;0 WireConnection;123;0;121;0 WireConnection;103;0;104;0 WireConnection;103;1;105;0 WireConnection;103;6;106;0 WireConnection;107;0;108;0 WireConnection;107;1;109;0 WireConnection;107;6;110;0 WireConnection;102;0;127;0 WireConnection;102;1;103;0 WireConnection;102;2;107;0 WireConnection;128;0;129;0 WireConnection;128;2;102;0 WireConnection;128;3;131;0 WireConnection;128;4;131;0 WireConnection;130;0;128;0 WireConnection;113;0;130;0 WireConnection;115;0;113;0 WireConnection;115;1;113;1 WireConnection;115;2;113;2 WireConnection;133;0;115;0 WireConnection;181;0;180;0 WireConnection;181;1;182;0 WireConnection;176;1;177;4 WireConnection;175;0;174;1 WireConnection;175;1;174;3 WireConnection;178;0;175;0 WireConnection;178;1;176;0 WireConnection;59;0;77;0 WireConnection;59;1;79;0 WireConnection;60;0;59;0 WireConnection;71;0;60;0 WireConnection;77;0;76;1 WireConnection;195;0;194;0 WireConnection;195;1;196;0 WireConnection;207;0;35;0 WireConnection;207;1;208;0 WireConnection;227;1;97;0 WireConnection;227;0;133;0 WireConnection;135;0;225;0 WireConnection;135;1;1;0 WireConnection;225;434;204;0 WireConnection;225;417;157;0 WireConnection;225;416;158;0 WireConnection;225;419;159;0 WireConnection;225;420;160;0 WireConnection;225;418;161;0 WireConnection;225;415;162;0 WireConnection;229;0;227;0 WireConnection;229;1;1;14 WireConnection;229;3;1;56 WireConnection;229;4;1;45 ASEEND*/ //CHKSM=DA7117E88235F9BBF3C5A66F18ACAACF1AA4E2D5