// Made with Amplify Shader Editor v1.9.1.5 // Available at the Unity Asset Store - http://u3d.as/y3X Shader "CRS/SetDress/Terrain" { Properties { [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1) [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5 [ASEBegin]_SummerToWinter("SummerToWinter", Range( 0 , 1)) = 0 _Grass("Grass", Color) = (0.3411765,0.6352941,0,0) _SnowColor("Snow Color", Color) = (0.9056604,0.9056604,0.9056604,0) _Mud("Mud", Color) = (0.627451,0.4196078,0.2431373,0) _WetMud("Wet Mud", Color) = (0.6156863,0.3058824,0,1) _Grassnormal("Grass normal", 2D) = "bump" {} _Wetnessnormal("Wetness normal", 2D) = "bump" {} _Groundnormal("Ground normal", 2D) = "bump" {} _DetailBase("Detail Base", 2D) = "white" {} _DetailNormal("Detail Normal", 2D) = "bump" {} _SnowNormal("Snow Normal", 2D) = "bump" {} _DetailMask2("Detail Mask2", 2D) = "white" {} _BaseTexture("Base Texture", 2D) = "white" {} _TerrainTile("Terrain Tile", Float) = 16 [Header(Smoothness)]_RSmoothness("R Smoothness", Range( 0 , 1)) = 0 _GSmoothness("G Smoothness", Range( 0 , 1)) = 0 _BSmoothness("B Smoothness", Range( 0 , 1)) = 0 _ASmoothness("A Smoothness", Range( 0 , 1)) = 0 [Header(SPARKLES)]_SparklesIntensity("Sparkles Intensity", Range( 0 , 2)) = 0.34 _SparkleScale("Sparkle Scale", Float) = 20 _SparkleScale2("Sparkle Scale2", Range( 0 , 10)) = 0.23 _SpraklesTile("Sprakles Tile", Float) = 2 _SparkleCutoff("Sparkle Cutoff", Range( 0 , 10)) = 0.0015 _SnowTile("Snow Tile", Float) = 1 _SnowMaskTIle("SnowMaskTIle", Float) = 1 [Header (RAIN)][Toggle(_RAINRIPPLESSTATICSWITCH_ON)] _RainRipplesStaticSwitch("Rain Ripples Static Switch", Float) = 0 _RainRoughness("Rain Roughness", Range( 0 , 1)) = 0.5 _RainIntensity("Rain Intensity", Range( 0 , 1)) = 0 [Header(RIM COLOR)]_RimColor4("Rim Color", Color) = (0.5,0.5,0.5,1) _RimPower("Rim Power", Range( 0 , 20)) = 0.5 _RainBaseColor("Rain BaseColor", Range( 0 , 1)) = 0.1 _Distortion("Distortion", Float) = 0.1 _FlowSpeed("Flow Speed", Float) = 1 _RainScale("Rain Scale", Vector) = (1,1,0,0) [Header(RIPPLES)]_RipplesBaseColor("Ripples BaseColor", Range( 0 , 1)) = 0.1 _RIpplesTile("RIpples Tile", Float) = 5 [ASEEnd]_GradientTile("Gradient Tile", Float) = 0 //_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.0 [HideInInspector][ToggleOff] _EnvironmentReflections("Environment Reflections", Float) = 1.0 [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 3.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 #define _NORMAL_DROPOFF_TS 1 #pragma multi_compile_instancing #pragma instancing_options renderinglayer #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE #pragma multi_compile_fog #define ASE_FOG 1 #define _EMISSION #define _NORMALMAP 1 #define ASE_SRP_VERSION 120110 #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_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 #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 #pragma multi_compile_fragment _ _LIGHT_LAYERS #pragma multi_compile_fragment _ _LIGHT_COOKIES #pragma multi_compile _ _CLUSTERED_RENDERING #pragma shader_feature_local _RECEIVE_SHADOWS_OFF #pragma shader_feature_local_fragment _SPECULARHIGHLIGHTS_OFF #pragma shader_feature_local_fragment _ENVIRONMENTREFLECTIONS_OFF #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 multi_compile_fragment _ DEBUG_DISPLAY #pragma vertex vert #pragma fragment frag #define SHADERPASS SHADERPASS_FORWARD #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.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(UNITY_INSTANCING_ENABLED) && defined(_TERRAIN_INSTANCED_PERPIXEL_NORMAL) #define ENABLE_TERRAIN_PERPIXEL_NORMAL #endif #define ASE_NEEDS_FRAG_COLOR #define ASE_NEEDS_FRAG_SCREEN_POSITION #define ASE_NEEDS_FRAG_WORLD_POSITION #define ASE_NEEDS_FRAG_WORLD_VIEW_DIR #define ASE_NEEDS_FRAG_WORLD_NORMAL #pragma multi_compile_local __ _RAINRIPPLESSTATICSWITCH_ON struct VertexInput { float4 vertex : POSITION; float3 ase_normal : NORMAL; float4 ase_tangent : TANGENT; float4 texcoord : TEXCOORD0; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; half4 ase_color : COLOR; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float4 clipPos : SV_POSITION; float4 lightmapUVOrVertexSH : TEXCOORD0; half4 fogFactorAndVertexLight : TEXCOORD1; #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) float4 shadowCoord : TEXCOORD2; #endif float4 tSpace0 : TEXCOORD3; float4 tSpace1 : TEXCOORD4; float4 tSpace2 : TEXCOORD5; #if defined(ASE_NEEDS_FRAG_SCREEN_POSITION) float4 screenPos : TEXCOORD6; #endif #if defined(DYNAMICLIGHTMAP_ON) float2 dynamicLightmapUV : TEXCOORD7; #endif float4 ase_texcoord8 : TEXCOORD8; float4 ase_color : COLOR; float4 ase_texcoord9 : TEXCOORD9; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) half4 _Grass; half4 _WetMud; half4 _Mud; half4 _SnowColor; float4 _RimColor4; half2 _RainScale; half _BSmoothness; half _GSmoothness; half _RSmoothness; float _RimPower; half _RainBaseColor; half _FlowSpeed; half _Distortion; half _SnowTile; half _RipplesBaseColor; half _RIpplesTile; half _ASmoothness; half _GradientTile; half _SnowMaskTIle; half _SummerToWinter; half _SparklesIntensity; float _SparkleScale; half _SpraklesTile; float _SparkleScale2; float _SparkleCutoff; half _TerrainTile; half _RainIntensity; half _RainRoughness; #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 // Property used by ScenePickingPass #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif // Properties used by SceneSelectionPass #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif sampler2D _BaseTexture; sampler2D _DetailBase; sampler2D _DetailMask2; sampler2D _Grassnormal; sampler2D _Wetnessnormal; sampler2D _Groundnormal; sampler2D _DetailNormal; sampler2D _SnowNormal; //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl" //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/PBRForwardPass.hlsl" //#ifdef HAVE_VFX_MODIFICATION //#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl" //#endif VertexOutput VertexFunction( VertexInput v ) { VertexOutput o = (VertexOutput)0; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.ase_texcoord8.xy = v.texcoord.xy; o.ase_color = v.ase_color; o.ase_texcoord9 = v.vertex; //setting value to unused interpolator channels and avoid initialization warnings o.ase_texcoord8.zw = 0; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.vertex.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.vertex.xyz = vertexValue; #else v.vertex.xyz += vertexValue; #endif v.ase_normal = v.ase_normal; float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); float3 positionVS = TransformWorldToView( positionWS ); float4 positionCS = TransformWorldToHClip( positionWS ); VertexNormalInputs normalInput = GetVertexNormalInputs( v.ase_normal, v.ase_tangent ); o.tSpace0 = float4( normalInput.normalWS, positionWS.x); o.tSpace1 = float4( normalInput.tangentWS, positionWS.y); o.tSpace2 = float4( normalInput.bitangentWS, positionWS.z); #if defined(LIGHTMAP_ON) OUTPUT_LIGHTMAP_UV( v.texcoord1, unity_LightmapST, o.lightmapUVOrVertexSH.xy ); #endif #if !defined(LIGHTMAP_ON) OUTPUT_SH( normalInput.normalWS.xyz, o.lightmapUVOrVertexSH.xyz ); #endif #if defined(DYNAMICLIGHTMAP_ON) o.dynamicLightmapUV.xy = v.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; #endif #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) o.lightmapUVOrVertexSH.zw = v.texcoord; o.lightmapUVOrVertexSH.xy = v.texcoord * unity_LightmapST.xy + unity_LightmapST.zw; #endif half3 vertexLight = VertexLighting( positionWS, normalInput.normalWS ); #ifdef ASE_FOG half fogFactor = ComputeFogFactor( positionCS.z ); #else half fogFactor = 0; #endif o.fogFactorAndVertexLight = half4(fogFactor, vertexLight); #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) VertexPositionInputs vertexInput = (VertexPositionInputs)0; vertexInput.positionWS = positionWS; vertexInput.positionCS = positionCS; o.shadowCoord = GetShadowCoord( vertexInput ); #endif o.clipPos = positionCS; #if defined(ASE_NEEDS_FRAG_SCREEN_POSITION) o.screenPos = ComputeScreenPos(positionCS); #endif return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 ase_normal : NORMAL; float4 ase_tangent : TANGENT; float4 texcoord : TEXCOORD0; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; half4 ase_color : COLOR; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.vertex; o.ase_normal = v.ase_normal; o.ase_tangent = v.ase_tangent; o.texcoord = v.texcoord; o.texcoord1 = v.texcoord1; o.texcoord2 = v.texcoord2; o.ase_color = v.ase_color; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [domain("tri")] [partitioning("fractional_odd")] [outputtopology("triangle_cw")] [patchconstantfunc("TessellationFunction")] [outputcontrolpoints(3)] VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) { return patch[id]; } [domain("tri")] VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { VertexInput o = (VertexInput) 0; o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; o.ase_tangent = patch[0].ase_tangent * bary.x + patch[1].ase_tangent * bary.y + patch[2].ase_tangent * bary.z; o.texcoord = patch[0].texcoord * bary.x + patch[1].texcoord * bary.y + patch[2].texcoord * bary.z; o.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z; o.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z; o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); float phongStrength = _TessPhongStrength; o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else VertexOutput vert ( VertexInput v ) { return VertexFunction( v ); } #endif #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) #define ASE_SV_DEPTH SV_DepthLessEqual #else #define ASE_SV_DEPTH SV_Depth #endif half4 frag ( VertexOutput IN #ifdef ASE_DEPTH_WRITE_ON ,out float outputDepth : ASE_SV_DEPTH #endif ) : SV_Target { UNITY_SETUP_INSTANCE_ID(IN); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN); #ifdef LOD_FADE_CROSSFADE LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); #endif #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) float2 sampleCoords = (IN.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( IN.tSpace0.xyz ); float3 WorldTangent = IN.tSpace1.xyz; float3 WorldBiTangent = IN.tSpace2.xyz; #endif float3 WorldPosition = float3(IN.tSpace0.w,IN.tSpace1.w,IN.tSpace2.w); float3 WorldViewDirection = _WorldSpaceCameraPos.xyz - WorldPosition; float4 ShadowCoords = float4( 0, 0, 0, 0 ); #if defined(ASE_NEEDS_FRAG_SCREEN_POSITION) float4 ScreenPos = IN.screenPos; #endif float2 NormalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(IN.clipPos); #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) ShadowCoords = IN.shadowCoord; #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); #endif WorldViewDirection = SafeNormalize( WorldViewDirection ); half2 temp_cast_0 = (_TerrainTile).xx; half2 texCoord16 = IN.ase_texcoord8.xy * temp_cast_0 + float2( 0,0 ); half2 TileR79 = texCoord16; half MaskG46 = IN.ase_color.g; half4 lerpResult3 = lerp( ( _Grass * tex2D( _BaseTexture, TileR79 ).g ) , _WetMud , MaskG46); half MaskB47 = IN.ase_color.b; half4 lerpResult8 = lerp( lerpResult3 , _Mud , MaskB47); half2 temp_cast_1 = (_TerrainTile).xx; half2 texCoord177 = IN.ase_texcoord8.xy * temp_cast_1 + float2( 0,0 ); half2 TileA171 = texCoord177; half HeightA101 = tex2D( _BaseTexture, TileA171 ).r; half MaskA76 = saturate( ( HeightA101 * ( 1.0 - IN.ase_color.a ) * 10.0 ) ); half4 lerpResult34 = lerp( lerpResult8 , tex2D( _DetailBase, TileA171 ) , MaskA76); half2 _Vector0 = half2(20,25); float4 ase_screenPosNorm = ScreenPos / ScreenPos.w; ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; half4 lerpResult278 = lerp( ( half4( _Vector0, 0.0 , 0.0 ) * ase_screenPosNorm ) , half4( ( half3( _Vector0 , 0.0 ) * WorldPosition ) , 0.0 ) , 0.8); half4 tex2DNode390 = tex2D( _DetailMask2, ( lerpResult278 * _SparkleScale2 ).xy ); half2 temp_cast_6 = (_SpraklesTile).xx; half2 texCoord379 = IN.ase_texcoord8.xy * temp_cast_6 + float2( 0,0 ); half4 tex2DNode391 = tex2D( _DetailMask2, ( texCoord379 * _SparkleScale ) ); half Sparkles286 = ( step( _SparkleCutoff , ( tex2DNode390.a * tex2DNode391.a ) ) * _SparklesIntensity ); half2 temp_cast_7 = (_SnowMaskTIle).xx; half2 texCoord241 = IN.ase_texcoord8.xy * temp_cast_7 + float2( 0,0 ); half temp_output_3_0_g1 = ( _SummerToWinter - tex2D( _DetailMask2, texCoord241 ).b ); half SnowMask231 = saturate( saturate( ( temp_output_3_0_g1 / fwidth( temp_output_3_0_g1 ) ) ) ); half4 lerpResult189 = lerp( lerpResult34 , ( _SnowColor + Sparkles286 ) , SnowMask231); half4 AlbedoBase426 = lerpResult34; half2 temp_cast_8 = (_GradientTile).xx; half2 texCoord338 = IN.ase_texcoord8.xy * temp_cast_8 + float2( 0,0 ); half2 temp_cast_9 = (_RIpplesTile).xx; half2 texCoord332 = IN.ase_texcoord8.xy * temp_cast_9 + float2( 0,0 ); half4 tex2DNode334 = tex2D( _DetailMask2, texCoord332 ); half2 temp_cast_10 = (tex2DNode334.g).xx; half2 panner337 = ( 1.0 * _Time.y * float2( 0.4,0.4 ) + temp_cast_10); half temp_output_369_0 = saturate( ( ( tex2D( _DetailMask2, ( texCoord338 + panner337 ) ).r * tex2DNode334.g ) * 10.0 ) ); half lerpResult305 = lerp( ( temp_output_369_0 * 5.0 ) , ( temp_output_369_0 * _RainIntensity ) , _RainIntensity); half Ripples306 = lerpResult305; half3 appendResult438 = (half3(IN.ase_color.r , IN.ase_color.g , IN.ase_color.b)); half2 temp_cast_11 = (_TerrainTile).xx; half2 texCoord175 = IN.ase_texcoord8.xy * temp_cast_11 + float2( 0,0 ); half2 TileG168 = texCoord175; half3 lerpResult13 = lerp( UnpackNormalScale( tex2D( _Grassnormal, TileR79 ), 1.0f ) , UnpackNormalScale( tex2D( _Wetnessnormal, TileG168 ), 1.0f ) , MaskG46); half2 temp_cast_12 = (_TerrainTile).xx; half2 texCoord176 = IN.ase_texcoord8.xy * temp_cast_12 + float2( 0,0 ); half2 TileB169 = texCoord176; half3 lerpResult14 = lerp( lerpResult13 , UnpackNormalScale( tex2D( _Groundnormal, TileB169 ), 1.0f ) , MaskB47); half3 lerpResult36 = lerp( lerpResult14 , UnpackNormalScale( tex2D( _DetailNormal, TileA171 ), 1.0f ) , MaskA76); half2 temp_cast_13 = (_SnowTile).xx; half2 texCoord224 = IN.ase_texcoord8.xy * temp_cast_13 + float2( 0,0 ); half3 lerpResult223 = lerp( lerpResult36 , UnpackNormalScale( tex2D( _SnowNormal, texCoord224 ), 1.0f ) , SnowMask231); half3 Dis366 = ( ( appendResult438 + lerpResult223 ) * _Distortion ); half4 transform431 = mul(GetObjectToWorldMatrix(),half4( IN.ase_texcoord9.xyz , 0.0 )); half2 appendResult432 = (half2(transform431.x , transform431.z)); half2 panner377 = ( ( _TimeParameters.x * _FlowSpeed ) * float2( 0,0.1 ) + ( appendResult432 * _RainScale )); half4 break393 = tex2D( _DetailMask2, ( Dis366 + half3( panner377 , 0.0 ) ).xy ); half SteaksRouighness403 = ( break393.r + break393.g ); half4 lerpResult326 = lerp( AlbedoBase426 , ( ( ( Ripples306 * _RipplesBaseColor ) + ( SteaksRouighness403 * _RainBaseColor ) ) + AlbedoBase426 ) , _RainIntensity); #ifdef _RAINRIPPLESSTATICSWITCH_ON half4 staticSwitch328 = lerpResult326; #else half4 staticSwitch328 = AlbedoBase426; #endif half4 Albedo330 = staticSwitch328; #ifdef _RAINRIPPLESSTATICSWITCH_ON half4 staticSwitch505 = Albedo330; #else half4 staticSwitch505 = lerpResult189; #endif half fresnelNdotV449 = dot( WorldNormal, WorldViewDirection ); half fresnelNode449 = ( 0.0 + 2.24 * pow( max( 1.0 - fresnelNdotV449 , 0.0001 ), _RimPower ) ); half4 lerpResult453 = lerp( float4( 0,0,0,0 ) , ( _RimColor4 * fresnelNode449 ) , SnowMask231); half4 Emission455 = lerpResult453; half lerpResult144 = lerp( _RSmoothness , _GSmoothness , MaskG46); half lerpResult147 = lerp( lerpResult144 , _BSmoothness , MaskB47); half lerpResult149 = lerp( lerpResult147 , _ASmoothness , MaskA76); half Roughness424 = lerpResult149; half lerpResult325 = lerp( Roughness424 , ( ( ( 0.15 + SteaksRouighness403 ) * _RainRoughness ) + Ripples306 ) , _RainIntensity); #ifdef _RAINRIPPLESSTATICSWITCH_ON half staticSwitch327 = lerpResult325; #else half staticSwitch327 = Roughness424; #endif half RainRipplesRoughnessBaseColorOpactiy329 = staticSwitch327; float3 BaseColor = staticSwitch505.rgb; float3 Normal = lerpResult223; float3 Emission = Emission455.rgb; float3 Specular = 0.5; float Metallic = 0; float Smoothness = RainRipplesRoughnessBaseColorOpactiy329; 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 = 0; #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.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 = IN.fogFactorAndVertexLight.x; #endif inputData.vertexLighting = IN.fogFactorAndVertexLight.yzw; #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) float3 SH = SampleSH(inputData.normalWS.xyz); #else float3 SH = IN.lightmapUVOrVertexSH.xyz; #endif #if defined(DYNAMICLIGHTMAP_ON) inputData.bakedGI = SAMPLE_GI(IN.lightmapUVOrVertexSH.xy, IN.dynamicLightmapUV.xy, SH, inputData.normalWS); #else inputData.bakedGI = SAMPLE_GI(IN.lightmapUVOrVertexSH.xy, SH, inputData.normalWS); #endif #ifdef ASE_BAKEDGI inputData.bakedGI = BakedGI; #endif inputData.normalizedScreenSpaceUV = NormalizedScreenSpaceUV; inputData.shadowMask = SAMPLE_SHADOWMASK(IN.lightmapUVOrVertexSH.xy); #if defined(DEBUG_DISPLAY) #if defined(DYNAMICLIGHTMAP_ON) inputData.dynamicLightmapUV = IN.dynamicLightmapUV.xy; #endif #if defined(LIGHTMAP_ON) inputData.staticLightmapUV = IN.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(IN.clipPos, surfaceData, inputData); #endif half4 color = UniversalFragmentPBR( inputData, surfaceData); #ifdef ASE_TRANSMISSION { float shadow = _TransmissionShadow; Light mainLight = GetMainLight( inputData.shadowCoord ); float3 mainAtten = mainLight.color * mainLight.distanceAttenuation; mainAtten = lerp( mainAtten, mainAtten * mainLight.shadowAttenuation, shadow ); half3 mainTransmission = max(0 , -dot(inputData.normalWS, mainLight.direction)) * mainAtten * Transmission; color.rgb += BaseColor * mainTransmission; #ifdef _ADDITIONAL_LIGHTS int transPixelLightCount = GetAdditionalLightsCount(); for (int i = 0; i < transPixelLightCount; ++i) { Light light = GetAdditionalLight(i, inputData.positionWS); 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; } #endif } #endif #ifdef ASE_TRANSLUCENCY { float shadow = _TransShadow; float normal = _TransNormal; float scattering = _TransScattering; float direct = _TransDirect; float ambient = _TransAmbient; float strength = _TransStrength; Light mainLight = GetMainLight( inputData.shadowCoord ); float3 mainAtten = mainLight.color * mainLight.distanceAttenuation; mainAtten = lerp( mainAtten, mainAtten * mainLight.shadowAttenuation, shadow ); half3 mainLightDir = mainLight.direction + inputData.normalWS * normal; half mainVdotL = pow( saturate( dot( inputData.viewDirectionWS, -mainLightDir ) ), scattering ); half3 mainTranslucency = mainAtten * ( mainVdotL * direct + inputData.bakedGI * ambient ) * Translucency; color.rgb += BaseColor * mainTranslucency * strength; #ifdef _ADDITIONAL_LIGHTS int transPixelLightCount = GetAdditionalLightsCount(); for (int i = 0; i < transPixelLightCount; ++i) { Light light = GetAdditionalLight(i, inputData.positionWS); 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; } #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 ), IN.fogFactorAndVertexLight.x ); #else color.rgb = MixFog(color.rgb, IN.fogFactorAndVertexLight.x); #endif #endif #ifdef ASE_DEPTH_WRITE_ON outputDepth = DepthValue; #endif return color; } ENDHLSL } Pass { Name "ShadowCaster" Tags { "LightMode"="ShadowCaster" } ZWrite On ZTest LEqual AlphaToMask Off ColorMask 0 HLSLPROGRAM #define _NORMAL_DROPOFF_TS 1 #pragma multi_compile_instancing #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE #define ASE_FOG 1 #define _EMISSION #define _NORMALMAP 1 #define ASE_SRP_VERSION 120110 #pragma vertex vert #pragma fragment frag #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW #define SHADERPASS SHADERPASS_SHADOWCASTER #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.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" struct VertexInput { float4 vertex : POSITION; float3 ase_normal : NORMAL; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float4 clipPos : SV_POSITION; #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 worldPos : TEXCOORD0; #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) float4 shadowCoord : TEXCOORD1; #endif UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) half4 _Grass; half4 _WetMud; half4 _Mud; half4 _SnowColor; float4 _RimColor4; half2 _RainScale; half _BSmoothness; half _GSmoothness; half _RSmoothness; float _RimPower; half _RainBaseColor; half _FlowSpeed; half _Distortion; half _SnowTile; half _RipplesBaseColor; half _RIpplesTile; half _ASmoothness; half _GradientTile; half _SnowMaskTIle; half _SummerToWinter; half _SparklesIntensity; float _SparkleScale; half _SpraklesTile; float _SparkleScale2; float _SparkleCutoff; half _TerrainTile; half _RainIntensity; half _RainRoughness; #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 // Property used by ScenePickingPass #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif // Properties used by SceneSelectionPass #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl" //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShadowCasterPass.hlsl" //#ifdef HAVE_VFX_MODIFICATION //#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl" //#endif float3 _LightDirection; float3 _LightPosition; VertexOutput VertexFunction( VertexInput v ) { VertexOutput o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o ); #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.vertex.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.vertex.xyz = vertexValue; #else v.vertex.xyz += vertexValue; #endif v.ase_normal = v.ase_normal; float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) o.worldPos = positionWS; #endif float3 normalWS = TransformObjectToWorldDir(v.ase_normal); #if _CASTING_PUNCTUAL_LIGHT_SHADOW float3 lightDirectionWS = normalize(_LightPosition - positionWS); #else float3 lightDirectionWS = _LightDirection; #endif float4 clipPos = TransformWorldToHClip(ApplyShadowBias(positionWS, normalWS, lightDirectionWS)); #if UNITY_REVERSED_Z clipPos.z = min(clipPos.z, UNITY_NEAR_CLIP_VALUE); #else clipPos.z = max(clipPos.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 = clipPos; o.shadowCoord = GetShadowCoord( vertexInput ); #endif o.clipPos = clipPos; return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 ase_normal : NORMAL; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.vertex; o.ase_normal = v.ase_normal; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [domain("tri")] [partitioning("fractional_odd")] [outputtopology("triangle_cw")] [patchconstantfunc("TessellationFunction")] [outputcontrolpoints(3)] VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) { return patch[id]; } [domain("tri")] VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { VertexInput o = (VertexInput) 0; o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); float phongStrength = _TessPhongStrength; o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else VertexOutput vert ( VertexInput v ) { return VertexFunction( v ); } #endif #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) #define ASE_SV_DEPTH SV_DepthLessEqual #else #define ASE_SV_DEPTH SV_Depth #endif half4 frag( VertexOutput IN #ifdef ASE_DEPTH_WRITE_ON ,out float outputDepth : ASE_SV_DEPTH #endif ) : SV_TARGET { UNITY_SETUP_INSTANCE_ID( IN ); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 WorldPosition = IN.worldPos; #endif float4 ShadowCoords = float4( 0, 0, 0, 0 ); #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) ShadowCoords = IN.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 = 0; #endif #ifdef _ALPHATEST_ON #ifdef _ALPHATEST_SHADOW_ON clip(Alpha - AlphaClipThresholdShadow); #else clip(Alpha - AlphaClipThreshold); #endif #endif #ifdef LOD_FADE_CROSSFADE LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); #endif #ifdef ASE_DEPTH_WRITE_ON outputDepth = DepthValue; #endif return 0; } ENDHLSL } Pass { Name "DepthOnly" Tags { "LightMode"="DepthOnly" } ZWrite On ColorMask 0 AlphaToMask Off HLSLPROGRAM #define _NORMAL_DROPOFF_TS 1 #pragma multi_compile_instancing #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE #define ASE_FOG 1 #define _EMISSION #define _NORMALMAP 1 #define ASE_SRP_VERSION 120110 #pragma vertex vert #pragma fragment frag #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.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" struct VertexInput { float4 vertex : POSITION; float3 ase_normal : NORMAL; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float4 clipPos : SV_POSITION; #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 worldPos : TEXCOORD0; #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) float4 shadowCoord : TEXCOORD1; #endif UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) half4 _Grass; half4 _WetMud; half4 _Mud; half4 _SnowColor; float4 _RimColor4; half2 _RainScale; half _BSmoothness; half _GSmoothness; half _RSmoothness; float _RimPower; half _RainBaseColor; half _FlowSpeed; half _Distortion; half _SnowTile; half _RipplesBaseColor; half _RIpplesTile; half _ASmoothness; half _GradientTile; half _SnowMaskTIle; half _SummerToWinter; half _SparklesIntensity; float _SparkleScale; half _SpraklesTile; float _SparkleScale2; float _SparkleCutoff; half _TerrainTile; half _RainIntensity; half _RainRoughness; #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 // Property used by ScenePickingPass #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif // Properties used by SceneSelectionPass #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl" //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/DepthOnlyPass.hlsl" //#ifdef HAVE_VFX_MODIFICATION //#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl" //#endif VertexOutput VertexFunction( VertexInput v ) { VertexOutput o = (VertexOutput)0; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.vertex.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.vertex.xyz = vertexValue; #else v.vertex.xyz += vertexValue; #endif v.ase_normal = v.ase_normal; float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); float4 positionCS = TransformWorldToHClip( positionWS ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) o.worldPos = positionWS; #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) VertexPositionInputs vertexInput = (VertexPositionInputs)0; vertexInput.positionWS = positionWS; vertexInput.positionCS = positionCS; o.shadowCoord = GetShadowCoord( vertexInput ); #endif o.clipPos = positionCS; return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 ase_normal : NORMAL; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.vertex; o.ase_normal = v.ase_normal; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [domain("tri")] [partitioning("fractional_odd")] [outputtopology("triangle_cw")] [patchconstantfunc("TessellationFunction")] [outputcontrolpoints(3)] VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) { return patch[id]; } [domain("tri")] VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { VertexInput o = (VertexInput) 0; o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); float phongStrength = _TessPhongStrength; o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else VertexOutput vert ( VertexInput v ) { return VertexFunction( v ); } #endif #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) #define ASE_SV_DEPTH SV_DepthLessEqual #else #define ASE_SV_DEPTH SV_Depth #endif half4 frag( VertexOutput IN #ifdef ASE_DEPTH_WRITE_ON ,out float outputDepth : ASE_SV_DEPTH #endif ) : SV_TARGET { UNITY_SETUP_INSTANCE_ID(IN); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 WorldPosition = IN.worldPos; #endif float4 ShadowCoords = float4( 0, 0, 0, 0 ); #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) ShadowCoords = IN.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 = 0; #endif #ifdef _ALPHATEST_ON clip(Alpha - AlphaClipThreshold); #endif #ifdef LOD_FADE_CROSSFADE LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); #endif #ifdef ASE_DEPTH_WRITE_ON outputDepth = DepthValue; #endif return 0; } ENDHLSL } Pass { Name "Meta" Tags { "LightMode"="Meta" } Cull Off HLSLPROGRAM #define _NORMAL_DROPOFF_TS 1 #define ASE_FOG 1 #define _EMISSION #define _NORMALMAP 1 #define ASE_SRP_VERSION 120110 #pragma vertex vert #pragma fragment frag #pragma shader_feature EDITOR_VISUALIZATION #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.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_COLOR #define ASE_NEEDS_FRAG_WORLD_POSITION #define ASE_NEEDS_VERT_NORMAL #pragma multi_compile_local __ _RAINRIPPLESSTATICSWITCH_ON struct VertexInput { float4 vertex : POSITION; float3 ase_normal : NORMAL; float4 texcoord0 : TEXCOORD0; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; half4 ase_color : COLOR; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float4 clipPos : SV_POSITION; #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 worldPos : 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_color : COLOR; float4 ase_texcoord5 : TEXCOORD5; float4 ase_texcoord6 : TEXCOORD6; float4 ase_texcoord7 : TEXCOORD7; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) half4 _Grass; half4 _WetMud; half4 _Mud; half4 _SnowColor; float4 _RimColor4; half2 _RainScale; half _BSmoothness; half _GSmoothness; half _RSmoothness; float _RimPower; half _RainBaseColor; half _FlowSpeed; half _Distortion; half _SnowTile; half _RipplesBaseColor; half _RIpplesTile; half _ASmoothness; half _GradientTile; half _SnowMaskTIle; half _SummerToWinter; half _SparklesIntensity; float _SparkleScale; half _SpraklesTile; float _SparkleScale2; float _SparkleCutoff; half _TerrainTile; half _RainIntensity; half _RainRoughness; #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 // Property used by ScenePickingPass #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif // Properties used by SceneSelectionPass #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif sampler2D _BaseTexture; sampler2D _DetailBase; sampler2D _DetailMask2; sampler2D _Grassnormal; sampler2D _Wetnessnormal; sampler2D _Groundnormal; sampler2D _DetailNormal; sampler2D _SnowNormal; //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl" //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/LightingMetaPass.hlsl" //#ifdef HAVE_VFX_MODIFICATION //#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl" //#endif VertexOutput VertexFunction( VertexInput v ) { VertexOutput o = (VertexOutput)0; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); float4 ase_clipPos = TransformObjectToHClip((v.vertex).xyz); float4 screenPos = ComputeScreenPos(ase_clipPos); o.ase_texcoord5 = screenPos; half3 ase_worldNormal = TransformObjectToWorldNormal(v.ase_normal); o.ase_texcoord7.xyz = ase_worldNormal; o.ase_texcoord4.xy = v.texcoord0.xy; o.ase_color = v.ase_color; o.ase_texcoord6 = v.vertex; //setting value to unused interpolator channels and avoid initialization warnings o.ase_texcoord4.zw = 0; o.ase_texcoord7.w = 0; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.vertex.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.vertex.xyz = vertexValue; #else v.vertex.xyz += vertexValue; #endif v.ase_normal = v.ase_normal; float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) o.worldPos = positionWS; #endif o.clipPos = MetaVertexPosition( v.vertex, v.texcoord1.xy, v.texcoord1.xy, unity_LightmapST, unity_DynamicLightmapST ); #ifdef EDITOR_VISUALIZATION float2 VizUV = 0; float4 LightCoord = 0; UnityEditorVizData(v.vertex.xyz, v.texcoord0.xy, v.texcoord1.xy, v.texcoord2.xy, VizUV, LightCoord); o.VizUV = float4(VizUV, 0, 0); o.LightCoord = LightCoord; #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) VertexPositionInputs vertexInput = (VertexPositionInputs)0; vertexInput.positionWS = positionWS; vertexInput.positionCS = o.clipPos; o.shadowCoord = GetShadowCoord( vertexInput ); #endif return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 ase_normal : NORMAL; float4 texcoord0 : TEXCOORD0; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; half4 ase_color : COLOR; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.vertex; o.ase_normal = v.ase_normal; o.texcoord0 = v.texcoord0; o.texcoord1 = v.texcoord1; o.texcoord2 = v.texcoord2; o.ase_color = v.ase_color; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [domain("tri")] [partitioning("fractional_odd")] [outputtopology("triangle_cw")] [patchconstantfunc("TessellationFunction")] [outputcontrolpoints(3)] VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) { return patch[id]; } [domain("tri")] VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { VertexInput o = (VertexInput) 0; o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; o.texcoord0 = patch[0].texcoord0 * bary.x + patch[1].texcoord0 * bary.y + patch[2].texcoord0 * bary.z; o.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z; o.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z; o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); float phongStrength = _TessPhongStrength; o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else VertexOutput vert ( VertexInput v ) { return VertexFunction( v ); } #endif half4 frag(VertexOutput IN ) : SV_TARGET { UNITY_SETUP_INSTANCE_ID(IN); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 WorldPosition = IN.worldPos; #endif float4 ShadowCoords = float4( 0, 0, 0, 0 ); #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) ShadowCoords = IN.shadowCoord; #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); #endif #endif half2 temp_cast_0 = (_TerrainTile).xx; half2 texCoord16 = IN.ase_texcoord4.xy * temp_cast_0 + float2( 0,0 ); half2 TileR79 = texCoord16; half MaskG46 = IN.ase_color.g; half4 lerpResult3 = lerp( ( _Grass * tex2D( _BaseTexture, TileR79 ).g ) , _WetMud , MaskG46); half MaskB47 = IN.ase_color.b; half4 lerpResult8 = lerp( lerpResult3 , _Mud , MaskB47); half2 temp_cast_1 = (_TerrainTile).xx; half2 texCoord177 = IN.ase_texcoord4.xy * temp_cast_1 + float2( 0,0 ); half2 TileA171 = texCoord177; half HeightA101 = tex2D( _BaseTexture, TileA171 ).r; half MaskA76 = saturate( ( HeightA101 * ( 1.0 - IN.ase_color.a ) * 10.0 ) ); half4 lerpResult34 = lerp( lerpResult8 , tex2D( _DetailBase, TileA171 ) , MaskA76); half2 _Vector0 = half2(20,25); float4 screenPos = IN.ase_texcoord5; float4 ase_screenPosNorm = screenPos / screenPos.w; ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; half4 lerpResult278 = lerp( ( half4( _Vector0, 0.0 , 0.0 ) * ase_screenPosNorm ) , half4( ( half3( _Vector0 , 0.0 ) * WorldPosition ) , 0.0 ) , 0.8); half4 tex2DNode390 = tex2D( _DetailMask2, ( lerpResult278 * _SparkleScale2 ).xy ); half2 temp_cast_6 = (_SpraklesTile).xx; half2 texCoord379 = IN.ase_texcoord4.xy * temp_cast_6 + float2( 0,0 ); half4 tex2DNode391 = tex2D( _DetailMask2, ( texCoord379 * _SparkleScale ) ); half Sparkles286 = ( step( _SparkleCutoff , ( tex2DNode390.a * tex2DNode391.a ) ) * _SparklesIntensity ); half2 temp_cast_7 = (_SnowMaskTIle).xx; half2 texCoord241 = IN.ase_texcoord4.xy * temp_cast_7 + float2( 0,0 ); half temp_output_3_0_g1 = ( _SummerToWinter - tex2D( _DetailMask2, texCoord241 ).b ); half SnowMask231 = saturate( saturate( ( temp_output_3_0_g1 / fwidth( temp_output_3_0_g1 ) ) ) ); half4 lerpResult189 = lerp( lerpResult34 , ( _SnowColor + Sparkles286 ) , SnowMask231); half4 AlbedoBase426 = lerpResult34; half2 temp_cast_8 = (_GradientTile).xx; half2 texCoord338 = IN.ase_texcoord4.xy * temp_cast_8 + float2( 0,0 ); half2 temp_cast_9 = (_RIpplesTile).xx; half2 texCoord332 = IN.ase_texcoord4.xy * temp_cast_9 + float2( 0,0 ); half4 tex2DNode334 = tex2D( _DetailMask2, texCoord332 ); half2 temp_cast_10 = (tex2DNode334.g).xx; half2 panner337 = ( 1.0 * _Time.y * float2( 0.4,0.4 ) + temp_cast_10); half temp_output_369_0 = saturate( ( ( tex2D( _DetailMask2, ( texCoord338 + panner337 ) ).r * tex2DNode334.g ) * 10.0 ) ); half lerpResult305 = lerp( ( temp_output_369_0 * 5.0 ) , ( temp_output_369_0 * _RainIntensity ) , _RainIntensity); half Ripples306 = lerpResult305; half3 appendResult438 = (half3(IN.ase_color.r , IN.ase_color.g , IN.ase_color.b)); half2 temp_cast_11 = (_TerrainTile).xx; half2 texCoord175 = IN.ase_texcoord4.xy * temp_cast_11 + float2( 0,0 ); half2 TileG168 = texCoord175; half3 lerpResult13 = lerp( UnpackNormalScale( tex2D( _Grassnormal, TileR79 ), 1.0f ) , UnpackNormalScale( tex2D( _Wetnessnormal, TileG168 ), 1.0f ) , MaskG46); half2 temp_cast_12 = (_TerrainTile).xx; half2 texCoord176 = IN.ase_texcoord4.xy * temp_cast_12 + float2( 0,0 ); half2 TileB169 = texCoord176; half3 lerpResult14 = lerp( lerpResult13 , UnpackNormalScale( tex2D( _Groundnormal, TileB169 ), 1.0f ) , MaskB47); half3 lerpResult36 = lerp( lerpResult14 , UnpackNormalScale( tex2D( _DetailNormal, TileA171 ), 1.0f ) , MaskA76); half2 temp_cast_13 = (_SnowTile).xx; half2 texCoord224 = IN.ase_texcoord4.xy * temp_cast_13 + float2( 0,0 ); half3 lerpResult223 = lerp( lerpResult36 , UnpackNormalScale( tex2D( _SnowNormal, texCoord224 ), 1.0f ) , SnowMask231); half3 Dis366 = ( ( appendResult438 + lerpResult223 ) * _Distortion ); half4 transform431 = mul(GetObjectToWorldMatrix(),half4( IN.ase_texcoord6.xyz , 0.0 )); half2 appendResult432 = (half2(transform431.x , transform431.z)); half2 panner377 = ( ( _TimeParameters.x * _FlowSpeed ) * float2( 0,0.1 ) + ( appendResult432 * _RainScale )); half4 break393 = tex2D( _DetailMask2, ( Dis366 + half3( panner377 , 0.0 ) ).xy ); half SteaksRouighness403 = ( break393.r + break393.g ); half4 lerpResult326 = lerp( AlbedoBase426 , ( ( ( Ripples306 * _RipplesBaseColor ) + ( SteaksRouighness403 * _RainBaseColor ) ) + AlbedoBase426 ) , _RainIntensity); #ifdef _RAINRIPPLESSTATICSWITCH_ON half4 staticSwitch328 = lerpResult326; #else half4 staticSwitch328 = AlbedoBase426; #endif half4 Albedo330 = staticSwitch328; #ifdef _RAINRIPPLESSTATICSWITCH_ON half4 staticSwitch505 = Albedo330; #else half4 staticSwitch505 = lerpResult189; #endif float3 ase_worldViewDir = ( _WorldSpaceCameraPos.xyz - WorldPosition ); ase_worldViewDir = SafeNormalize( ase_worldViewDir ); half3 ase_worldNormal = IN.ase_texcoord7.xyz; half fresnelNdotV449 = dot( ase_worldNormal, ase_worldViewDir ); half fresnelNode449 = ( 0.0 + 2.24 * pow( max( 1.0 - fresnelNdotV449 , 0.0001 ), _RimPower ) ); half4 lerpResult453 = lerp( float4( 0,0,0,0 ) , ( _RimColor4 * fresnelNode449 ) , SnowMask231); half4 Emission455 = lerpResult453; float3 BaseColor = staticSwitch505.rgb; float3 Emission = Emission455.rgb; 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 = IN.VizUV.xy; metaInput.LightCoord = IN.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 #define _NORMAL_DROPOFF_TS 1 #define ASE_FOG 1 #define _EMISSION #define _NORMALMAP 1 #define ASE_SRP_VERSION 120110 #pragma vertex vert #pragma fragment frag #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.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" #define ASE_NEEDS_FRAG_COLOR #define ASE_NEEDS_FRAG_WORLD_POSITION #pragma multi_compile_local __ _RAINRIPPLESSTATICSWITCH_ON struct VertexInput { float4 vertex : POSITION; float3 ase_normal : NORMAL; float4 ase_texcoord : TEXCOORD0; half4 ase_color : COLOR; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float4 clipPos : SV_POSITION; #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 worldPos : TEXCOORD0; #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) float4 shadowCoord : TEXCOORD1; #endif float4 ase_texcoord2 : TEXCOORD2; float4 ase_color : COLOR; float4 ase_texcoord3 : TEXCOORD3; float4 ase_texcoord4 : TEXCOORD4; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) half4 _Grass; half4 _WetMud; half4 _Mud; half4 _SnowColor; float4 _RimColor4; half2 _RainScale; half _BSmoothness; half _GSmoothness; half _RSmoothness; float _RimPower; half _RainBaseColor; half _FlowSpeed; half _Distortion; half _SnowTile; half _RipplesBaseColor; half _RIpplesTile; half _ASmoothness; half _GradientTile; half _SnowMaskTIle; half _SummerToWinter; half _SparklesIntensity; float _SparkleScale; half _SpraklesTile; float _SparkleScale2; float _SparkleCutoff; half _TerrainTile; half _RainIntensity; half _RainRoughness; #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 // Property used by ScenePickingPass #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif // Properties used by SceneSelectionPass #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif sampler2D _BaseTexture; sampler2D _DetailBase; sampler2D _DetailMask2; sampler2D _Grassnormal; sampler2D _Wetnessnormal; sampler2D _Groundnormal; sampler2D _DetailNormal; sampler2D _SnowNormal; //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl" //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/PBR2DPass.hlsl" //#ifdef HAVE_VFX_MODIFICATION //#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl" //#endif VertexOutput VertexFunction( VertexInput v ) { VertexOutput o = (VertexOutput)0; UNITY_SETUP_INSTANCE_ID( v ); UNITY_TRANSFER_INSTANCE_ID( v, o ); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o ); float4 ase_clipPos = TransformObjectToHClip((v.vertex).xyz); float4 screenPos = ComputeScreenPos(ase_clipPos); o.ase_texcoord3 = screenPos; o.ase_texcoord2.xy = v.ase_texcoord.xy; o.ase_color = v.ase_color; o.ase_texcoord4 = v.vertex; //setting value to unused interpolator channels and avoid initialization warnings o.ase_texcoord2.zw = 0; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.vertex.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.vertex.xyz = vertexValue; #else v.vertex.xyz += vertexValue; #endif v.ase_normal = v.ase_normal; float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); float4 positionCS = TransformWorldToHClip( positionWS ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) o.worldPos = positionWS; #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) VertexPositionInputs vertexInput = (VertexPositionInputs)0; vertexInput.positionWS = positionWS; vertexInput.positionCS = positionCS; o.shadowCoord = GetShadowCoord( vertexInput ); #endif o.clipPos = positionCS; return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 ase_normal : NORMAL; float4 ase_texcoord : TEXCOORD0; half4 ase_color : COLOR; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.vertex; o.ase_normal = v.ase_normal; o.ase_texcoord = v.ase_texcoord; o.ase_color = v.ase_color; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [domain("tri")] [partitioning("fractional_odd")] [outputtopology("triangle_cw")] [patchconstantfunc("TessellationFunction")] [outputcontrolpoints(3)] VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) { return patch[id]; } [domain("tri")] VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { VertexInput o = (VertexInput) 0; o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); float phongStrength = _TessPhongStrength; o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else VertexOutput vert ( VertexInput v ) { return VertexFunction( v ); } #endif half4 frag(VertexOutput IN ) : SV_TARGET { UNITY_SETUP_INSTANCE_ID( IN ); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 WorldPosition = IN.worldPos; #endif float4 ShadowCoords = float4( 0, 0, 0, 0 ); #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) ShadowCoords = IN.shadowCoord; #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); #endif #endif half2 temp_cast_0 = (_TerrainTile).xx; half2 texCoord16 = IN.ase_texcoord2.xy * temp_cast_0 + float2( 0,0 ); half2 TileR79 = texCoord16; half MaskG46 = IN.ase_color.g; half4 lerpResult3 = lerp( ( _Grass * tex2D( _BaseTexture, TileR79 ).g ) , _WetMud , MaskG46); half MaskB47 = IN.ase_color.b; half4 lerpResult8 = lerp( lerpResult3 , _Mud , MaskB47); half2 temp_cast_1 = (_TerrainTile).xx; half2 texCoord177 = IN.ase_texcoord2.xy * temp_cast_1 + float2( 0,0 ); half2 TileA171 = texCoord177; half HeightA101 = tex2D( _BaseTexture, TileA171 ).r; half MaskA76 = saturate( ( HeightA101 * ( 1.0 - IN.ase_color.a ) * 10.0 ) ); half4 lerpResult34 = lerp( lerpResult8 , tex2D( _DetailBase, TileA171 ) , MaskA76); half2 _Vector0 = half2(20,25); float4 screenPos = IN.ase_texcoord3; float4 ase_screenPosNorm = screenPos / screenPos.w; ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; half4 lerpResult278 = lerp( ( half4( _Vector0, 0.0 , 0.0 ) * ase_screenPosNorm ) , half4( ( half3( _Vector0 , 0.0 ) * WorldPosition ) , 0.0 ) , 0.8); half4 tex2DNode390 = tex2D( _DetailMask2, ( lerpResult278 * _SparkleScale2 ).xy ); half2 temp_cast_6 = (_SpraklesTile).xx; half2 texCoord379 = IN.ase_texcoord2.xy * temp_cast_6 + float2( 0,0 ); half4 tex2DNode391 = tex2D( _DetailMask2, ( texCoord379 * _SparkleScale ) ); half Sparkles286 = ( step( _SparkleCutoff , ( tex2DNode390.a * tex2DNode391.a ) ) * _SparklesIntensity ); half2 temp_cast_7 = (_SnowMaskTIle).xx; half2 texCoord241 = IN.ase_texcoord2.xy * temp_cast_7 + float2( 0,0 ); half temp_output_3_0_g1 = ( _SummerToWinter - tex2D( _DetailMask2, texCoord241 ).b ); half SnowMask231 = saturate( saturate( ( temp_output_3_0_g1 / fwidth( temp_output_3_0_g1 ) ) ) ); half4 lerpResult189 = lerp( lerpResult34 , ( _SnowColor + Sparkles286 ) , SnowMask231); half4 AlbedoBase426 = lerpResult34; half2 temp_cast_8 = (_GradientTile).xx; half2 texCoord338 = IN.ase_texcoord2.xy * temp_cast_8 + float2( 0,0 ); half2 temp_cast_9 = (_RIpplesTile).xx; half2 texCoord332 = IN.ase_texcoord2.xy * temp_cast_9 + float2( 0,0 ); half4 tex2DNode334 = tex2D( _DetailMask2, texCoord332 ); half2 temp_cast_10 = (tex2DNode334.g).xx; half2 panner337 = ( 1.0 * _Time.y * float2( 0.4,0.4 ) + temp_cast_10); half temp_output_369_0 = saturate( ( ( tex2D( _DetailMask2, ( texCoord338 + panner337 ) ).r * tex2DNode334.g ) * 10.0 ) ); half lerpResult305 = lerp( ( temp_output_369_0 * 5.0 ) , ( temp_output_369_0 * _RainIntensity ) , _RainIntensity); half Ripples306 = lerpResult305; half3 appendResult438 = (half3(IN.ase_color.r , IN.ase_color.g , IN.ase_color.b)); half2 temp_cast_11 = (_TerrainTile).xx; half2 texCoord175 = IN.ase_texcoord2.xy * temp_cast_11 + float2( 0,0 ); half2 TileG168 = texCoord175; half3 lerpResult13 = lerp( UnpackNormalScale( tex2D( _Grassnormal, TileR79 ), 1.0f ) , UnpackNormalScale( tex2D( _Wetnessnormal, TileG168 ), 1.0f ) , MaskG46); half2 temp_cast_12 = (_TerrainTile).xx; half2 texCoord176 = IN.ase_texcoord2.xy * temp_cast_12 + float2( 0,0 ); half2 TileB169 = texCoord176; half3 lerpResult14 = lerp( lerpResult13 , UnpackNormalScale( tex2D( _Groundnormal, TileB169 ), 1.0f ) , MaskB47); half3 lerpResult36 = lerp( lerpResult14 , UnpackNormalScale( tex2D( _DetailNormal, TileA171 ), 1.0f ) , MaskA76); half2 temp_cast_13 = (_SnowTile).xx; half2 texCoord224 = IN.ase_texcoord2.xy * temp_cast_13 + float2( 0,0 ); half3 lerpResult223 = lerp( lerpResult36 , UnpackNormalScale( tex2D( _SnowNormal, texCoord224 ), 1.0f ) , SnowMask231); half3 Dis366 = ( ( appendResult438 + lerpResult223 ) * _Distortion ); half4 transform431 = mul(GetObjectToWorldMatrix(),half4( IN.ase_texcoord4.xyz , 0.0 )); half2 appendResult432 = (half2(transform431.x , transform431.z)); half2 panner377 = ( ( _TimeParameters.x * _FlowSpeed ) * float2( 0,0.1 ) + ( appendResult432 * _RainScale )); half4 break393 = tex2D( _DetailMask2, ( Dis366 + half3( panner377 , 0.0 ) ).xy ); half SteaksRouighness403 = ( break393.r + break393.g ); half4 lerpResult326 = lerp( AlbedoBase426 , ( ( ( Ripples306 * _RipplesBaseColor ) + ( SteaksRouighness403 * _RainBaseColor ) ) + AlbedoBase426 ) , _RainIntensity); #ifdef _RAINRIPPLESSTATICSWITCH_ON half4 staticSwitch328 = lerpResult326; #else half4 staticSwitch328 = AlbedoBase426; #endif half4 Albedo330 = staticSwitch328; #ifdef _RAINRIPPLESSTATICSWITCH_ON half4 staticSwitch505 = Albedo330; #else half4 staticSwitch505 = lerpResult189; #endif float3 BaseColor = staticSwitch505.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 #define _NORMAL_DROPOFF_TS 1 #pragma multi_compile_instancing #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE #define ASE_FOG 1 #define _EMISSION #define _NORMALMAP 1 #define ASE_SRP_VERSION 120110 #pragma vertex vert #pragma fragment frag #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY #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.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" #define ASE_NEEDS_FRAG_COLOR struct VertexInput { float4 vertex : POSITION; float3 ase_normal : NORMAL; float4 ase_tangent : TANGENT; float4 ase_texcoord : TEXCOORD0; half4 ase_color : COLOR; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float4 clipPos : SV_POSITION; #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 worldPos : TEXCOORD0; #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) float4 shadowCoord : TEXCOORD1; #endif float3 worldNormal : TEXCOORD2; float4 worldTangent : TEXCOORD3; float4 ase_texcoord4 : TEXCOORD4; float4 ase_color : COLOR; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) half4 _Grass; half4 _WetMud; half4 _Mud; half4 _SnowColor; float4 _RimColor4; half2 _RainScale; half _BSmoothness; half _GSmoothness; half _RSmoothness; float _RimPower; half _RainBaseColor; half _FlowSpeed; half _Distortion; half _SnowTile; half _RipplesBaseColor; half _RIpplesTile; half _ASmoothness; half _GradientTile; half _SnowMaskTIle; half _SummerToWinter; half _SparklesIntensity; float _SparkleScale; half _SpraklesTile; float _SparkleScale2; float _SparkleCutoff; half _TerrainTile; half _RainIntensity; half _RainRoughness; #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 // Property used by ScenePickingPass #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif // Properties used by SceneSelectionPass #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif sampler2D _Grassnormal; sampler2D _Wetnessnormal; sampler2D _Groundnormal; sampler2D _DetailNormal; sampler2D _BaseTexture; sampler2D _SnowNormal; sampler2D _DetailMask2; //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl" //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/DepthNormalsOnlyPass.hlsl" //#ifdef HAVE_VFX_MODIFICATION //#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl" //#endif VertexOutput VertexFunction( VertexInput v ) { VertexOutput o = (VertexOutput)0; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.ase_texcoord4.xy = v.ase_texcoord.xy; o.ase_color = v.ase_color; //setting value to unused interpolator channels and avoid initialization warnings o.ase_texcoord4.zw = 0; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.vertex.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.vertex.xyz = vertexValue; #else v.vertex.xyz += vertexValue; #endif v.ase_normal = v.ase_normal; float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); float3 normalWS = TransformObjectToWorldNormal( v.ase_normal ); float4 tangentWS = float4(TransformObjectToWorldDir( v.ase_tangent.xyz), v.ase_tangent.w); float4 positionCS = TransformWorldToHClip( positionWS ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) o.worldPos = positionWS; #endif o.worldNormal = normalWS; o.worldTangent = tangentWS; #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) VertexPositionInputs vertexInput = (VertexPositionInputs)0; vertexInput.positionWS = positionWS; vertexInput.positionCS = positionCS; o.shadowCoord = GetShadowCoord( vertexInput ); #endif o.clipPos = positionCS; return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 ase_normal : NORMAL; float4 ase_tangent : TANGENT; float4 ase_texcoord : TEXCOORD0; half4 ase_color : COLOR; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.vertex; o.ase_normal = v.ase_normal; o.ase_tangent = v.ase_tangent; o.ase_texcoord = v.ase_texcoord; o.ase_color = v.ase_color; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [domain("tri")] [partitioning("fractional_odd")] [outputtopology("triangle_cw")] [patchconstantfunc("TessellationFunction")] [outputcontrolpoints(3)] VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) { return patch[id]; } [domain("tri")] VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { VertexInput o = (VertexInput) 0; o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; o.ase_tangent = patch[0].ase_tangent * bary.x + patch[1].ase_tangent * bary.y + patch[2].ase_tangent * bary.z; o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); float phongStrength = _TessPhongStrength; o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else VertexOutput vert ( VertexInput v ) { return VertexFunction( v ); } #endif #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) #define ASE_SV_DEPTH SV_DepthLessEqual #else #define ASE_SV_DEPTH SV_Depth #endif half4 frag( VertexOutput IN #ifdef ASE_DEPTH_WRITE_ON ,out float outputDepth : ASE_SV_DEPTH #endif ) : SV_TARGET { UNITY_SETUP_INSTANCE_ID(IN); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 WorldPosition = IN.worldPos; #endif float4 ShadowCoords = float4( 0, 0, 0, 0 ); float3 WorldNormal = IN.worldNormal; float4 WorldTangent = IN.worldTangent; #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) ShadowCoords = IN.shadowCoord; #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); #endif #endif half2 temp_cast_0 = (_TerrainTile).xx; half2 texCoord16 = IN.ase_texcoord4.xy * temp_cast_0 + float2( 0,0 ); half2 TileR79 = texCoord16; half2 temp_cast_1 = (_TerrainTile).xx; half2 texCoord175 = IN.ase_texcoord4.xy * temp_cast_1 + float2( 0,0 ); half2 TileG168 = texCoord175; half MaskG46 = IN.ase_color.g; half3 lerpResult13 = lerp( UnpackNormalScale( tex2D( _Grassnormal, TileR79 ), 1.0f ) , UnpackNormalScale( tex2D( _Wetnessnormal, TileG168 ), 1.0f ) , MaskG46); half2 temp_cast_2 = (_TerrainTile).xx; half2 texCoord176 = IN.ase_texcoord4.xy * temp_cast_2 + float2( 0,0 ); half2 TileB169 = texCoord176; half MaskB47 = IN.ase_color.b; half3 lerpResult14 = lerp( lerpResult13 , UnpackNormalScale( tex2D( _Groundnormal, TileB169 ), 1.0f ) , MaskB47); half2 temp_cast_3 = (_TerrainTile).xx; half2 texCoord177 = IN.ase_texcoord4.xy * temp_cast_3 + float2( 0,0 ); half2 TileA171 = texCoord177; half HeightA101 = tex2D( _BaseTexture, TileA171 ).r; half MaskA76 = saturate( ( HeightA101 * ( 1.0 - IN.ase_color.a ) * 10.0 ) ); half3 lerpResult36 = lerp( lerpResult14 , UnpackNormalScale( tex2D( _DetailNormal, TileA171 ), 1.0f ) , MaskA76); half2 temp_cast_4 = (_SnowTile).xx; half2 texCoord224 = IN.ase_texcoord4.xy * temp_cast_4 + float2( 0,0 ); half2 temp_cast_5 = (_SnowMaskTIle).xx; half2 texCoord241 = IN.ase_texcoord4.xy * temp_cast_5 + float2( 0,0 ); half temp_output_3_0_g1 = ( _SummerToWinter - tex2D( _DetailMask2, texCoord241 ).b ); half SnowMask231 = saturate( saturate( ( temp_output_3_0_g1 / fwidth( temp_output_3_0_g1 ) ) ) ); half3 lerpResult223 = lerp( lerpResult36 , UnpackNormalScale( tex2D( _SnowNormal, texCoord224 ), 1.0f ) , SnowMask231); float3 Normal = lerpResult223; float Alpha = 1; float AlphaClipThreshold = 0.5; #ifdef ASE_DEPTH_WRITE_ON float DepthValue = 0; #endif #ifdef _ALPHATEST_ON clip(Alpha - AlphaClipThreshold); #endif #ifdef LOD_FADE_CROSSFADE LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); #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); return 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 return half4(NormalizeNormalPerPixel(normalWS), 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 #define _NORMAL_DROPOFF_TS 1 #pragma multi_compile_instancing #pragma instancing_options renderinglayer #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE #pragma multi_compile_fog #define ASE_FOG 1 #define _EMISSION #define _NORMALMAP 1 #define ASE_SRP_VERSION 120110 #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 #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 #pragma multi_compile_fragment _ _LIGHT_LAYERS #pragma multi_compile_fragment _ _RENDER_PASS_ENABLED #pragma shader_feature_local _RECEIVE_SHADOWS_OFF #pragma shader_feature_local_fragment _SPECULARHIGHLIGHTS_OFF #pragma shader_feature_local_fragment _ENVIRONMENTREFLECTIONS_OFF #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 multi_compile_fragment _ _GBUFFER_NORMALS_OCT #pragma vertex vert #pragma fragment frag #define SHADERPASS SHADERPASS_GBUFFER #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.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(UNITY_INSTANCING_ENABLED) && defined(_TERRAIN_INSTANCED_PERPIXEL_NORMAL) #define ENABLE_TERRAIN_PERPIXEL_NORMAL #endif #define ASE_NEEDS_FRAG_COLOR #define ASE_NEEDS_FRAG_SCREEN_POSITION #define ASE_NEEDS_FRAG_WORLD_POSITION #define ASE_NEEDS_FRAG_WORLD_VIEW_DIR #define ASE_NEEDS_FRAG_WORLD_NORMAL #pragma multi_compile_local __ _RAINRIPPLESSTATICSWITCH_ON struct VertexInput { float4 vertex : POSITION; float3 ase_normal : NORMAL; float4 ase_tangent : TANGENT; float4 texcoord : TEXCOORD0; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; half4 ase_color : COLOR; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float4 clipPos : SV_POSITION; float4 lightmapUVOrVertexSH : TEXCOORD0; half4 fogFactorAndVertexLight : TEXCOORD1; #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) float4 shadowCoord : TEXCOORD2; #endif float4 tSpace0 : TEXCOORD3; float4 tSpace1 : TEXCOORD4; float4 tSpace2 : TEXCOORD5; #if defined(ASE_NEEDS_FRAG_SCREEN_POSITION) float4 screenPos : TEXCOORD6; #endif #if defined(DYNAMICLIGHTMAP_ON) float2 dynamicLightmapUV : TEXCOORD7; #endif float4 ase_texcoord8 : TEXCOORD8; float4 ase_color : COLOR; float4 ase_texcoord9 : TEXCOORD9; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) half4 _Grass; half4 _WetMud; half4 _Mud; half4 _SnowColor; float4 _RimColor4; half2 _RainScale; half _BSmoothness; half _GSmoothness; half _RSmoothness; float _RimPower; half _RainBaseColor; half _FlowSpeed; half _Distortion; half _SnowTile; half _RipplesBaseColor; half _RIpplesTile; half _ASmoothness; half _GradientTile; half _SnowMaskTIle; half _SummerToWinter; half _SparklesIntensity; float _SparkleScale; half _SpraklesTile; float _SparkleScale2; float _SparkleCutoff; half _TerrainTile; half _RainIntensity; half _RainRoughness; #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 // Property used by ScenePickingPass #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif // Properties used by SceneSelectionPass #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif sampler2D _BaseTexture; sampler2D _DetailBase; sampler2D _DetailMask2; sampler2D _Grassnormal; sampler2D _Wetnessnormal; sampler2D _Groundnormal; sampler2D _DetailNormal; sampler2D _SnowNormal; //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/UnityGBuffer.hlsl" //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/PBRGBufferPass.hlsl" VertexOutput VertexFunction( VertexInput v ) { VertexOutput o = (VertexOutput)0; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.ase_texcoord8.xy = v.texcoord.xy; o.ase_color = v.ase_color; o.ase_texcoord9 = v.vertex; //setting value to unused interpolator channels and avoid initialization warnings o.ase_texcoord8.zw = 0; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.vertex.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.vertex.xyz = vertexValue; #else v.vertex.xyz += vertexValue; #endif v.ase_normal = v.ase_normal; float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); float3 positionVS = TransformWorldToView( positionWS ); float4 positionCS = TransformWorldToHClip( positionWS ); VertexNormalInputs normalInput = GetVertexNormalInputs( v.ase_normal, v.ase_tangent ); o.tSpace0 = float4( normalInput.normalWS, positionWS.x); o.tSpace1 = float4( normalInput.tangentWS, positionWS.y); o.tSpace2 = float4( normalInput.bitangentWS, positionWS.z); #if defined(LIGHTMAP_ON) OUTPUT_LIGHTMAP_UV(v.texcoord1, unity_LightmapST, o.lightmapUVOrVertexSH.xy); #endif #if defined(DYNAMICLIGHTMAP_ON) o.dynamicLightmapUV.xy = v.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; #endif #if !defined(LIGHTMAP_ON) OUTPUT_SH(normalInput.normalWS.xyz, o.lightmapUVOrVertexSH.xyz); #endif #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) o.lightmapUVOrVertexSH.zw = v.texcoord; o.lightmapUVOrVertexSH.xy = v.texcoord * unity_LightmapST.xy + unity_LightmapST.zw; #endif half3 vertexLight = VertexLighting( positionWS, normalInput.normalWS ); o.fogFactorAndVertexLight = half4(0, vertexLight); #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) VertexPositionInputs vertexInput = (VertexPositionInputs)0; vertexInput.positionWS = positionWS; vertexInput.positionCS = positionCS; o.shadowCoord = GetShadowCoord( vertexInput ); #endif o.clipPos = positionCS; #if defined(ASE_NEEDS_FRAG_SCREEN_POSITION) o.screenPos = ComputeScreenPos(positionCS); #endif return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 ase_normal : NORMAL; float4 ase_tangent : TANGENT; float4 texcoord : TEXCOORD0; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; half4 ase_color : COLOR; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.vertex; o.ase_normal = v.ase_normal; o.ase_tangent = v.ase_tangent; o.texcoord = v.texcoord; o.texcoord1 = v.texcoord1; o.texcoord2 = v.texcoord2; o.ase_color = v.ase_color; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [domain("tri")] [partitioning("fractional_odd")] [outputtopology("triangle_cw")] [patchconstantfunc("TessellationFunction")] [outputcontrolpoints(3)] VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) { return patch[id]; } [domain("tri")] VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { VertexInput o = (VertexInput) 0; o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; o.ase_tangent = patch[0].ase_tangent * bary.x + patch[1].ase_tangent * bary.y + patch[2].ase_tangent * bary.z; o.texcoord = patch[0].texcoord * bary.x + patch[1].texcoord * bary.y + patch[2].texcoord * bary.z; o.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z; o.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z; o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); float phongStrength = _TessPhongStrength; o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else VertexOutput vert ( VertexInput v ) { return VertexFunction( v ); } #endif #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) #define ASE_SV_DEPTH SV_DepthLessEqual #else #define ASE_SV_DEPTH SV_Depth #endif FragmentOutput frag ( VertexOutput IN #ifdef ASE_DEPTH_WRITE_ON ,out float outputDepth : ASE_SV_DEPTH #endif ) { UNITY_SETUP_INSTANCE_ID(IN); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN); #ifdef LOD_FADE_CROSSFADE LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); #endif #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) float2 sampleCoords = (IN.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( IN.tSpace0.xyz ); float3 WorldTangent = IN.tSpace1.xyz; float3 WorldBiTangent = IN.tSpace2.xyz; #endif float3 WorldPosition = float3(IN.tSpace0.w,IN.tSpace1.w,IN.tSpace2.w); float3 WorldViewDirection = _WorldSpaceCameraPos.xyz - WorldPosition; float4 ShadowCoords = float4( 0, 0, 0, 0 ); #if defined(ASE_NEEDS_FRAG_SCREEN_POSITION) float4 ScreenPos = IN.screenPos; #endif float2 NormalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(IN.clipPos); #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) ShadowCoords = IN.shadowCoord; #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); #else ShadowCoords = float4(0, 0, 0, 0); #endif WorldViewDirection = SafeNormalize( WorldViewDirection ); half2 temp_cast_0 = (_TerrainTile).xx; half2 texCoord16 = IN.ase_texcoord8.xy * temp_cast_0 + float2( 0,0 ); half2 TileR79 = texCoord16; half MaskG46 = IN.ase_color.g; half4 lerpResult3 = lerp( ( _Grass * tex2D( _BaseTexture, TileR79 ).g ) , _WetMud , MaskG46); half MaskB47 = IN.ase_color.b; half4 lerpResult8 = lerp( lerpResult3 , _Mud , MaskB47); half2 temp_cast_1 = (_TerrainTile).xx; half2 texCoord177 = IN.ase_texcoord8.xy * temp_cast_1 + float2( 0,0 ); half2 TileA171 = texCoord177; half HeightA101 = tex2D( _BaseTexture, TileA171 ).r; half MaskA76 = saturate( ( HeightA101 * ( 1.0 - IN.ase_color.a ) * 10.0 ) ); half4 lerpResult34 = lerp( lerpResult8 , tex2D( _DetailBase, TileA171 ) , MaskA76); half2 _Vector0 = half2(20,25); float4 ase_screenPosNorm = ScreenPos / ScreenPos.w; ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; half4 lerpResult278 = lerp( ( half4( _Vector0, 0.0 , 0.0 ) * ase_screenPosNorm ) , half4( ( half3( _Vector0 , 0.0 ) * WorldPosition ) , 0.0 ) , 0.8); half4 tex2DNode390 = tex2D( _DetailMask2, ( lerpResult278 * _SparkleScale2 ).xy ); half2 temp_cast_6 = (_SpraklesTile).xx; half2 texCoord379 = IN.ase_texcoord8.xy * temp_cast_6 + float2( 0,0 ); half4 tex2DNode391 = tex2D( _DetailMask2, ( texCoord379 * _SparkleScale ) ); half Sparkles286 = ( step( _SparkleCutoff , ( tex2DNode390.a * tex2DNode391.a ) ) * _SparklesIntensity ); half2 temp_cast_7 = (_SnowMaskTIle).xx; half2 texCoord241 = IN.ase_texcoord8.xy * temp_cast_7 + float2( 0,0 ); half temp_output_3_0_g1 = ( _SummerToWinter - tex2D( _DetailMask2, texCoord241 ).b ); half SnowMask231 = saturate( saturate( ( temp_output_3_0_g1 / fwidth( temp_output_3_0_g1 ) ) ) ); half4 lerpResult189 = lerp( lerpResult34 , ( _SnowColor + Sparkles286 ) , SnowMask231); half4 AlbedoBase426 = lerpResult34; half2 temp_cast_8 = (_GradientTile).xx; half2 texCoord338 = IN.ase_texcoord8.xy * temp_cast_8 + float2( 0,0 ); half2 temp_cast_9 = (_RIpplesTile).xx; half2 texCoord332 = IN.ase_texcoord8.xy * temp_cast_9 + float2( 0,0 ); half4 tex2DNode334 = tex2D( _DetailMask2, texCoord332 ); half2 temp_cast_10 = (tex2DNode334.g).xx; half2 panner337 = ( 1.0 * _Time.y * float2( 0.4,0.4 ) + temp_cast_10); half temp_output_369_0 = saturate( ( ( tex2D( _DetailMask2, ( texCoord338 + panner337 ) ).r * tex2DNode334.g ) * 10.0 ) ); half lerpResult305 = lerp( ( temp_output_369_0 * 5.0 ) , ( temp_output_369_0 * _RainIntensity ) , _RainIntensity); half Ripples306 = lerpResult305; half3 appendResult438 = (half3(IN.ase_color.r , IN.ase_color.g , IN.ase_color.b)); half2 temp_cast_11 = (_TerrainTile).xx; half2 texCoord175 = IN.ase_texcoord8.xy * temp_cast_11 + float2( 0,0 ); half2 TileG168 = texCoord175; half3 lerpResult13 = lerp( UnpackNormalScale( tex2D( _Grassnormal, TileR79 ), 1.0f ) , UnpackNormalScale( tex2D( _Wetnessnormal, TileG168 ), 1.0f ) , MaskG46); half2 temp_cast_12 = (_TerrainTile).xx; half2 texCoord176 = IN.ase_texcoord8.xy * temp_cast_12 + float2( 0,0 ); half2 TileB169 = texCoord176; half3 lerpResult14 = lerp( lerpResult13 , UnpackNormalScale( tex2D( _Groundnormal, TileB169 ), 1.0f ) , MaskB47); half3 lerpResult36 = lerp( lerpResult14 , UnpackNormalScale( tex2D( _DetailNormal, TileA171 ), 1.0f ) , MaskA76); half2 temp_cast_13 = (_SnowTile).xx; half2 texCoord224 = IN.ase_texcoord8.xy * temp_cast_13 + float2( 0,0 ); half3 lerpResult223 = lerp( lerpResult36 , UnpackNormalScale( tex2D( _SnowNormal, texCoord224 ), 1.0f ) , SnowMask231); half3 Dis366 = ( ( appendResult438 + lerpResult223 ) * _Distortion ); half4 transform431 = mul(GetObjectToWorldMatrix(),half4( IN.ase_texcoord9.xyz , 0.0 )); half2 appendResult432 = (half2(transform431.x , transform431.z)); half2 panner377 = ( ( _TimeParameters.x * _FlowSpeed ) * float2( 0,0.1 ) + ( appendResult432 * _RainScale )); half4 break393 = tex2D( _DetailMask2, ( Dis366 + half3( panner377 , 0.0 ) ).xy ); half SteaksRouighness403 = ( break393.r + break393.g ); half4 lerpResult326 = lerp( AlbedoBase426 , ( ( ( Ripples306 * _RipplesBaseColor ) + ( SteaksRouighness403 * _RainBaseColor ) ) + AlbedoBase426 ) , _RainIntensity); #ifdef _RAINRIPPLESSTATICSWITCH_ON half4 staticSwitch328 = lerpResult326; #else half4 staticSwitch328 = AlbedoBase426; #endif half4 Albedo330 = staticSwitch328; #ifdef _RAINRIPPLESSTATICSWITCH_ON half4 staticSwitch505 = Albedo330; #else half4 staticSwitch505 = lerpResult189; #endif half fresnelNdotV449 = dot( WorldNormal, WorldViewDirection ); half fresnelNode449 = ( 0.0 + 2.24 * pow( max( 1.0 - fresnelNdotV449 , 0.0001 ), _RimPower ) ); half4 lerpResult453 = lerp( float4( 0,0,0,0 ) , ( _RimColor4 * fresnelNode449 ) , SnowMask231); half4 Emission455 = lerpResult453; half lerpResult144 = lerp( _RSmoothness , _GSmoothness , MaskG46); half lerpResult147 = lerp( lerpResult144 , _BSmoothness , MaskB47); half lerpResult149 = lerp( lerpResult147 , _ASmoothness , MaskA76); half Roughness424 = lerpResult149; half lerpResult325 = lerp( Roughness424 , ( ( ( 0.15 + SteaksRouighness403 ) * _RainRoughness ) + Ripples306 ) , _RainIntensity); #ifdef _RAINRIPPLESSTATICSWITCH_ON half staticSwitch327 = lerpResult325; #else half staticSwitch327 = Roughness424; #endif half RainRipplesRoughnessBaseColorOpactiy329 = staticSwitch327; float3 BaseColor = staticSwitch505.rgb; float3 Normal = lerpResult223; float3 Emission = Emission455.rgb; float3 Specular = 0.5; float Metallic = 0; float Smoothness = RainRipplesRoughnessBaseColorOpactiy329; 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 = 0; #endif #ifdef _ALPHATEST_ON clip(Alpha - AlphaClipThreshold); #endif InputData inputData = (InputData)0; inputData.positionWS = WorldPosition; inputData.positionCS = IN.clipPos; 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 ); inputData.vertexLighting = IN.fogFactorAndVertexLight.yzw; #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) float3 SH = SampleSH(inputData.normalWS.xyz); #else float3 SH = IN.lightmapUVOrVertexSH.xyz; #endif #ifdef ASE_BAKEDGI inputData.bakedGI = BakedGI; #else #if defined(DYNAMICLIGHTMAP_ON) inputData.bakedGI = SAMPLE_GI( IN.lightmapUVOrVertexSH.xy, IN.dynamicLightmapUV.xy, SH, inputData.normalWS); #else inputData.bakedGI = SAMPLE_GI( IN.lightmapUVOrVertexSH.xy, SH, inputData.normalWS ); #endif #endif inputData.normalizedScreenSpaceUV = NormalizedScreenSpaceUV; inputData.shadowMask = SAMPLE_SHADOWMASK(IN.lightmapUVOrVertexSH.xy); #if defined(DEBUG_DISPLAY) #if defined(DYNAMICLIGHTMAP_ON) inputData.dynamicLightmapUV = IN.dynamicLightmapUV.xy; #endif #if defined(LIGHTMAP_ON) inputData.staticLightmapUV = IN.lightmapUVOrVertexSH.xy; #else inputData.vertexSH = SH; #endif #endif #ifdef _DBUFFER ApplyDecal(IN.clipPos, 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 HLSLPROGRAM #define _NORMAL_DROPOFF_TS 1 #define ASE_FOG 1 #define _EMISSION #define _NORMALMAP 1 #define ASE_SRP_VERSION 120110 #pragma vertex vert #pragma fragment frag #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.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" struct VertexInput { float4 vertex : POSITION; float3 ase_normal : NORMAL; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float4 clipPos : SV_POSITION; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) half4 _Grass; half4 _WetMud; half4 _Mud; half4 _SnowColor; float4 _RimColor4; half2 _RainScale; half _BSmoothness; half _GSmoothness; half _RSmoothness; float _RimPower; half _RainBaseColor; half _FlowSpeed; half _Distortion; half _SnowTile; half _RipplesBaseColor; half _RIpplesTile; half _ASmoothness; half _GradientTile; half _SnowMaskTIle; half _SummerToWinter; half _SparklesIntensity; float _SparkleScale; half _SpraklesTile; float _SparkleScale2; float _SparkleCutoff; half _TerrainTile; half _RainIntensity; half _RainRoughness; #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 // Property used by ScenePickingPass #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif // Properties used by SceneSelectionPass #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl" //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/SelectionPickingPass.hlsl" //#ifdef HAVE_VFX_MODIFICATION //#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl" //#endif struct SurfaceDescription { float Alpha; float AlphaClipThreshold; }; VertexOutput VertexFunction(VertexInput v ) { VertexOutput o; ZERO_INITIALIZE(VertexOutput, o); UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.vertex.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.vertex.xyz = vertexValue; #else v.vertex.xyz += vertexValue; #endif v.ase_normal = v.ase_normal; float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); o.clipPos = TransformWorldToHClip(positionWS); return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 ase_normal : NORMAL; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.vertex; o.ase_normal = v.ase_normal; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [domain("tri")] [partitioning("fractional_odd")] [outputtopology("triangle_cw")] [patchconstantfunc("TessellationFunction")] [outputcontrolpoints(3)] VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) { return patch[id]; } [domain("tri")] VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { VertexInput o = (VertexInput) 0; o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); float phongStrength = _TessPhongStrength; o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else VertexOutput vert ( VertexInput v ) { return VertexFunction( v ); } #endif half4 frag(VertexOutput IN ) : 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" } HLSLPROGRAM #define _NORMAL_DROPOFF_TS 1 #define ASE_FOG 1 #define _EMISSION #define _NORMALMAP 1 #define ASE_SRP_VERSION 120110 #pragma vertex vert #pragma fragment frag #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.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" struct VertexInput { float4 vertex : POSITION; float3 ase_normal : NORMAL; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float4 clipPos : SV_POSITION; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) half4 _Grass; half4 _WetMud; half4 _Mud; half4 _SnowColor; float4 _RimColor4; half2 _RainScale; half _BSmoothness; half _GSmoothness; half _RSmoothness; float _RimPower; half _RainBaseColor; half _FlowSpeed; half _Distortion; half _SnowTile; half _RipplesBaseColor; half _RIpplesTile; half _ASmoothness; half _GradientTile; half _SnowMaskTIle; half _SummerToWinter; half _SparklesIntensity; float _SparkleScale; half _SpraklesTile; float _SparkleScale2; float _SparkleCutoff; half _TerrainTile; half _RainIntensity; half _RainRoughness; #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 // Property used by ScenePickingPass #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif // Properties used by SceneSelectionPass #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl" //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/SelectionPickingPass.hlsl" //#ifdef HAVE_VFX_MODIFICATION //#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl" //#endif struct SurfaceDescription { float Alpha; float AlphaClipThreshold; }; VertexOutput VertexFunction(VertexInput v ) { VertexOutput o; ZERO_INITIALIZE(VertexOutput, o); UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.vertex.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.vertex.xyz = vertexValue; #else v.vertex.xyz += vertexValue; #endif v.ase_normal = v.ase_normal; float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); o.clipPos = TransformWorldToHClip(positionWS); return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 ase_normal : NORMAL; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.vertex; o.ase_normal = v.ase_normal; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [domain("tri")] [partitioning("fractional_odd")] [outputtopology("triangle_cw")] [patchconstantfunc("TessellationFunction")] [outputcontrolpoints(3)] VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) { return patch[id]; } [domain("tri")] VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { VertexInput o = (VertexInput) 0; o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); float phongStrength = _TessPhongStrength; o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else VertexOutput vert ( VertexInput v ) { return VertexFunction( v ); } #endif half4 frag(VertexOutput IN ) : 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 "Hidden/InternalErrorShader" } /*ASEBEGIN Version=19105 Node;AmplifyShaderEditor.CommentaryNode;440;4451.801,1064.379;Inherit;False;2397.059;546.3036;Emission;13;453;442;452;494;450;451;449;448;446;447;445;444;443;Rim Light ;1,1,1,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;284;7576.462,178.513;Inherit;False;4413.796;919.9456;Comment;22;421;419;414;413;407;325;324;322;320;319;316;313;310;308;306;305;304;303;287;429;512;513;Rain Ripples Roughness/BaseColor Opactiy;1,1,1,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;509;-3030.264,-336.8183;Inherit;False;1564.315;715.592;Comment;5;2;104;46;47;116;Vertex Colors;1,1,1,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;508;-1186.712,459.7969;Inherit;False;1133.701;853.7128;Comment;11;145;146;147;149;144;424;141;140;142;148;143;Smoothness;1,1,1,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;83;-2097.947,461.7307;Inherit;False;886.6223;624.531;Comment;9;79;16;15;168;169;171;175;176;177;;1,1,1,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;104;-2622.441,49.72663;Inherit;False;1106.493;296.7481;Comment;6;76;136;72;93;110;73;Mask A;1,1,1,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;267;2139.183,423.0872;Inherit;False;3323.781;397.3914;Comment;16;403;400;393;389;382;377;376;370;367;362;361;357;349;346;431;432;Rain;1,1,1,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;268;5473.472,-614.5909;Inherit;False;2017.56;876.8102;Sparkles;31;410;405;401;397;395;392;391;390;387;385;381;380;379;378;373;372;371;364;363;360;352;286;283;282;281;280;279;278;277;276;275;Sparkles;1,1,1,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;298;9114.046,-260.4899;Inherit;False;398.9316;299.6933;Comment;1;327;;0,0.9019608,1,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;287;9301.311,313.4329;Inherit;False;2487.721;644.3846;Final Base;13;330;328;326;323;321;318;317;315;314;312;311;309;307;Final BaseColor;1,0.7458302,0,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;510;5.017359,459.9286;Inherit;False;1970.338;1136.233;Comment;19;12;35;78;10;11;182;181;13;61;62;14;36;184;183;222;224;225;233;223;Normals;1,1,1,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;291;7551.449,-255.7838;Inherit;False;1463.585;306.3002;Comment;3;423;422;425;Roughness;1,0,0,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;442;6155.207,1184.92;Inherit;False;218;170;Comment;1;455;Final Emission;1,0.7165726,0,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;235;2139.398,1059.003;Inherit;False;2244.469;554.9921;Comment;7;231;219;211;190;241;242;524;Snow Mask;1,1,1,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;511;-1349.338,-1263.658;Inherit;False;2758.698;1522.322;Comment;26;505;189;427;492;232;191;493;426;34;8;33;77;180;503;3;54;498;501;53;500;497;80;101;100;496;188;Albedo;1,1,1,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;265;5571.552,480.1799;Inherit;False;1032.278;369.667;Comment;6;366;358;350;436;438;433;Rain Distortion;1,1,1,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;255;2406.162,-278.1388;Inherit;False;3034.327;556.3071;Comment;21;409;406;398;384;375;369;365;356;354;348;345;344;341;340;338;337;335;334;333;332;331;Ripples;1,1,1,1;0;0 Node;AmplifyShaderEditor.SimpleAddOpNode;317;9879.584,564.844;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;405;6761.09,-127.8327;Inherit;False;Property;_SparklesIntensity;Sparkles Intensity;19;1;[Header];Create;True;1;SPARKLES;0;0;False;0;False;0.34;0.51;0;2;0;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;321;10411.96,773.4301;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;313;9814.425,969.7229;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;311;9320.61,632.7372;Inherit;False;Property;_RipplesBaseColor;Ripples BaseColor;35;1;[Header];Create;True;1;RIPPLES;0;0;False;0;False;0.1;0.272;0;1;0;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;397;6713.972,-330.4815;Float;False;Property;_SparkleCutoff;Sparkle Cutoff;23;0;Create;True;0;0;0;False;0;False;0.0015;0.001;0;10;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;312;9640.062,712.6654;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;395;6687.633,-242.5636;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SamplerNode;391;6377.972,-189.4816;Inherit;True;Property;_TextureSample0;Texture Sample 0;27;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.StepOpNode;401;6981.209,-266.1837;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;314;9684.057,548.2458;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;141;-1136.712,630.3262;Inherit;False;Property;_GSmoothness;G Smoothness;16;0;Create;True;0;0;0;False;0;False;0;0.7;0;1;0;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;308;8425.157,729.4261;Inherit;False;306;Ripples;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;429;9271.813,537.0051;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleAddOpNode;323;10212.96,557.8752;Inherit;True;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.WireNode;322;10248.46,246.8155;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;410;7143.709,-267.3106;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.LerpOp;326;10459.54,424.1711;Inherit;True;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;426;512.1067,-293.9379;Inherit;False;AlbedoBase;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.LerpOp;34;302.8125,-184.2676;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.SamplerNode;390;6377.972,-461.4816;Inherit;True;Property;_TextureSample6;Texture Sample 6;26;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.RangedFloatNode;307;9322.61,826.1639;Inherit;False;Property;_RainBaseColor;Rain BaseColor;31;0;Create;True;1;;0;0;False;0;False;0.1;0.05;0;1;0;1;FLOAT;0 Node;AmplifyShaderEditor.BreakToComponentsNode;393;4633.326,475.177;Inherit;True;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.SimpleMultiplyOpNode;276;5844.112,-552.5865;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT4;0,0,0,0;False;1;FLOAT4;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;498;-527.5211,-1202.834;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.WireNode;318;9917.796,834.5453;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;53;-486.4863,-681.6962;Inherit;False;46;MaskG;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;310;8306.489,932.676;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;371;5592.973,-76.48166;Inherit;False;Property;_SpraklesTile;Sprakles Tile;22;0;Create;True;0;0;0;False;0;False;2;2;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.LerpOp;3;-249.9187,-791.3255;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.ColorNode;503;-620.3759,-396.2365;Inherit;False;Property;_Mud;Mud;3;0;Create;True;0;0;0;False;0;False;0.627451,0.4196078,0.2431373,0;0.7803922,0.5882353,0.3529411,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.GetLocalVarNode;54;-152.3129,-279.1843;Inherit;False;47;MaskB;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;380;6309.18,156.7991;Inherit;False;1;0;SAMPLER2D;;False;1;SAMPLER2D;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;306;8620.543,235.9832;Inherit;True;Ripples;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;379;5847.973,-96.48166;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.RangedFloatNode;381;5931.572,37.71709;Float;False;Property;_SparkleScale;Sparkle Scale;20;0;Create;True;0;0;0;False;0;False;20;80;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;180;-933.9971,-163.6049;Inherit;False;171;TileA;1;0;OBJECT;;False;1;FLOAT2;0 Node;AmplifyShaderEditor.LerpOp;278;6030.028,-443.9415;Inherit;False;3;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0,0,0,0;False;2;FLOAT;0;False;1;FLOAT4;0 Node;AmplifyShaderEditor.RangedFloatNode;378;5785.973,-173.4816;Float;False;Property;_SparkleScale2;Sparkle Scale2;21;0;Create;True;0;0;0;False;0;False;0.23;0.96;0;10;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleAddOpNode;400;4925.983,474.3489;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.LerpOp;8;61.70557,-407.2337;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;277;5848.329,-404.1036;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;385;6166.472,-163.9816;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.GetLocalVarNode;77;38.5698,-82.8953;Inherit;False;76;MaskA;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.SamplerNode;33;-690.4997,-185.0941;Inherit;True;Property;_DetailBase;Detail Base;9;0;Create;True;0;0;0;False;0;False;-1;None;2ccdb59d14485ea4e84c1fe4e197fec7;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;279;6205.171,-424.1515;Inherit;False;2;2;0;FLOAT4;0,0,0,0;False;1;FLOAT;0;False;1;FLOAT4;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;403;5217.163,470.925;Inherit;True;SteaksRouighness;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;324;10664.76,264.6731;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.GetLocalVarNode;315;9879.401,364.4319;Inherit;True;426;AlbedoBase;1;0;OBJECT;;False;1;COLOR;0 Node;AmplifyShaderEditor.GetLocalVarNode;309;9383.586,733.6464;Inherit;False;403;SteaksRouighness;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;286;7287.251,-267.7706;Inherit;False;Sparkles;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;330;11226.58,361.7229;Inherit;True;Albedo;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.GetLocalVarNode;182;72.41941,746.0833;Inherit;False;168;TileG;1;0;OBJECT;;False;1;FLOAT2;0 Node;AmplifyShaderEditor.WireNode;416;5569.42,378.6902;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;372;5840.45,-279.7047;Inherit;False;Constant;_Float8;Float 8;54;0;Create;True;0;0;0;False;0;False;0.8;1.1;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;280;6313.972,-333.4815;Inherit;False;1;0;SAMPLER2D;;False;1;SAMPLER2D;0 Node;AmplifyShaderEditor.RangedFloatNode;140;-1131.051,509.7969;Inherit;False;Property;_RSmoothness;R Smoothness;15;1;[Header];Create;True;1;Smoothness;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;281;6712.48,-448.2545;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;145;-983.5909,754.7162;Inherit;False;46;MaskG;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.LerpOp;144;-783.0964,606.1666;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.ViewDirInputsCoordNode;443;4478.65,1122.78;Float;False;World;True;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 Node;AmplifyShaderEditor.GetLocalVarNode;146;-839.5906,951.7182;Inherit;False;47;MaskB;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;418;6617.814,413.4182;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;420;6694.375,503.1911;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;425;8454.17,-167.6447;Inherit;True;424;Roughness;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;415;5527.18,409.8152;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleAddOpNode;492;496.2264,16.45044;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.WireNode;447;4908.632,1250.982;Inherit;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.RangedFloatNode;448;4717.314,1318.318;Inherit;False;Constant;_RimScale;Rim Scale;35;0;Create;True;0;0;0;False;0;False;2.24;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleAddOpNode;421;7752.663,470.8162;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;419;7603.258,444.3811;Inherit;False;Constant;_Float4;Float 4;41;0;Create;True;0;0;0;False;0;False;0.15;0.65;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;513;8078.81,638.5277;Inherit;False;Property;_RainRoughness;Rain Roughness;27;0;Create;True;0;0;0;False;0;False;0.5;0.5;0;1;0;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;446;4615.173,1405.452;Float;False;Property;_RimPower;Rim Power;30;0;Create;True;0;0;0;False;0;False;0.5;0.1;0;20;0;1;FLOAT;0 Node;AmplifyShaderEditor.WorldNormalVector;445;4711.927,1104.484;Inherit;False;False;1;0;FLOAT3;0,0,1;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 Node;AmplifyShaderEditor.WireNode;316;8308.99,789.4213;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;512;8324.81,510.5277;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;424;-277.011,1087.685;Inherit;False;Roughness;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;319;8808.885,735.118;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;148;-702.8227,1197.512;Inherit;False;76;MaskA;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.LerpOp;147;-631.5908,839.7168;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;493;306.9763,105.5351;Inherit;False;286;Sparkles;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.LerpOp;149;-476.2976,1092.901;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;411;5517.947,458.637;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleAddOpNode;320;8603.775,489.1882;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;142;-1033.272,859.7658;Inherit;False;Property;_BSmoothness;B Smoothness;17;0;Create;True;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0 Node;AmplifyShaderEditor.ColorNode;191;94.64807,29.96303;Inherit;False;Property;_SnowColor;Snow Color;2;0;Create;True;0;0;0;False;0;False;0.9056604,0.9056604,0.9056604,0;1,1,1,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.GetLocalVarNode;427;763.9331,17.41978;Inherit;False;330;Albedo;1;0;OBJECT;;False;1;COLOR;0 Node;AmplifyShaderEditor.GetLocalVarNode;232;508.8762,142.6644;Inherit;False;231;SnowMask;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.LerpOp;189;732.8835,-210.1358;Inherit;True;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.WireNode;417;6571.126,397.8542;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;423;7952.712,-198.7218;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;282;6715.688,-522.0358;Inherit;False;Constant;_Float3;Float 3;52;0;Create;True;0;0;0;False;0;False;0.0001;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.StaticSwitch;505;1095.014,-233.1389;Inherit;True;Property;_Keyword0;Keyword 0;26;0;Create;True;0;0;0;False;0;False;0;0;0;True;;Toggle;2;Key0;Key1;Reference;327;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.SimpleMultiplyOpNode;72;-2138.62,119.7156;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;116;-2639.552,-286.8183;Inherit;False;MaskR;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;450;5302.559,1267.56;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;408;5504.766,499.8943;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.LerpOp;453;5764.979,1308.356;Inherit;True;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.GetLocalVarNode;494;5471.564,1338.916;Inherit;True;231;SnowMask;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;428;1447.758,-56.08558;Inherit;False;329;RainRipplesRoughnessBaseColorOpactiy;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.StaticSwitch;328;10779.17,359.6931;Inherit;True;Property;_Keyword0;Keyword 0;26;0;Create;True;0;0;0;False;0;False;0;0;0;True;;Toggle;2;Key0;Key1;Reference;327;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.RangedFloatNode;422;7581.439,-188.6608;Inherit;False;Property;_Roughness;Roughness;8;1;[Header];Create;True;1;DETAILS;0;0;False;0;False;0;1;0;1;0;1;FLOAT;0 Node;AmplifyShaderEditor.LerpOp;325;8941.779,247.0379;Inherit;True;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.StaticSwitch;327;9170.52,-202.2306;Inherit;True;Property;_RainRipplesStaticSwitch;Rain Ripples Static Switch;26;0;Create;True;0;0;0;False;1;Header (RAIN);False;1;0;0;True;;Toggle;2;Key0;Key1;Create;True;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;329;9570.604,-206.5739;Inherit;True;RainRipplesRoughnessBaseColorOpactiy;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.ColorNode;451;5353.93,1112.004;Float;False;Property;_RimColor4;Rim Color;29;1;[Header];Create;False;1;RIM COLOR;0;0;False;0;False;0.5,0.5,0.5,1;0.2259731,0.2405521,0.2769995,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.RegisterLocalVarNode;455;6179.207,1234.921;Inherit;False;Emission;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.GetLocalVarNode;457;1558.411,-136.4106;Inherit;False;455;Emission;1;0;OBJECT;;False;1;COLOR;0 Node;AmplifyShaderEditor.RangedFloatNode;143;-873.2803,1109.758;Inherit;False;Property;_ASmoothness;A Smoothness;18;0;Create;True;0;0;0;False;0;False;0;0.05;0;1;0;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;444;4671.629,1247.982;Inherit;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;452;5581.13,1239.853;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.SamplerNode;389;4277.298,470.2351;Inherit;True;Property;_TextureSample3;Texture Sample 3;37;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;True;bump;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.RangedFloatNode;348;4201.451,175.013;Inherit;False;Constant;_RIpplesIntensity;RIpples Intensity;37;0;Create;True;1;;0;0;False;0;False;10;1;0;10;0;1;FLOAT;0 Node;AmplifyShaderEditor.LerpOp;305;8310.485,235.1199;Inherit;True;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.StepOpNode;283;6882.688,-472.0358;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.ColorNode;501;-891.861,-769.3111;Inherit;False;Property;_WetMud;Wet Mud;4;0;Create;True;0;0;0;False;0;False;0.6156863,0.3058824,0,1;0.6156863,0.3058823,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.WireNode;368;3125.812,327.6589;Inherit;False;1;0;SAMPLER2D;;False;1;SAMPLER2D;0 Node;AmplifyShaderEditor.WireNode;412;5402.959,280.6389;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SaturateNode;136;-1965.323,119.0248;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;341;4095.532,153.5033;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;61;613.218,797.1303;Inherit;False;46;MaskG;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.SamplerNode;11;296.287,730.1644;Inherit;True;Property;_Wetnessnormal;Wetness normal;6;0;Create;True;0;0;0;False;0;False;-1;None;cb82cd65de57fde47a9fefd370ec97ea;True;0;True;bump;Auto;True;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.RegisterLocalVarNode;47;-2645.025,-108.0526;Inherit;False;MaskB;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;183;429.9432,947.6743;Inherit;False;169;TileB;1;0;OBJECT;;False;1;FLOAT2;0 Node;AmplifyShaderEditor.SamplerNode;344;3875.228,-91.85666;Inherit;True;Property;_TextureSample2;Texture Sample 2;1;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SamplerNode;12;634.304,927.4579;Inherit;True;Property;_Groundnormal;Ground normal;7;0;Create;True;0;0;0;False;0;False;-1;None;c14f03135f5246248b7a13f48587e659;True;0;True;bump;Auto;True;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.LerpOp;13;804.4495,530.2513;Inherit;False;3;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT;0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;177;-1800.376,958.8692;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.RegisterLocalVarNode;76;-1713.791,152.1162;Inherit;False;MaskA;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;225;464.3485,1412.754;Inherit;False;Property;_SnowTile;Snow Tile;24;0;Create;True;0;0;0;False;0;False;1;30;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;184;404.9151,1138.468;Inherit;False;171;TileA;1;0;OBJECT;;False;1;FLOAT2;0 Node;AmplifyShaderEditor.GetLocalVarNode;62;977.8262,1017.424;Inherit;False;47;MaskB;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.SamplerNode;35;639.5219,1114.229;Inherit;True;Property;_DetailNormal;Detail Normal;10;0;Create;True;0;0;0;False;0;False;-1;None;467af85f82997f44ca592b5c941d9f92;True;0;True;bump;Auto;True;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SamplerNode;222;923.2253,1366.16;Inherit;True;Property;_SnowNormal;Snow Normal;11;0;Create;True;0;0;0;False;0;False;-1;None;473de07ed07724249ae62c64cb0cd871;True;0;True;bump;Auto;True;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.WireNode;373;6277.18,204.7991;Inherit;False;1;0;SAMPLER2D;;False;1;SAMPLER2D;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;354;4255.85,-60.73068;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;345;4137.557,132.492;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;181;55.01736,529.1857;Inherit;False;79;TileR;1;0;OBJECT;;False;1;FLOAT2;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;169;-1469.131,812.9266;Inherit;False;TileB;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;338;3433.71,-229.1828;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;4,4;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SimpleAddOpNode;340;3696.027,-141.8537;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.RangedFloatNode;15;-2049.947,555.9744;Inherit;False;Property;_TerrainTile;Terrain Tile;14;0;Create;True;0;0;0;False;0;False;16;16;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.LerpOp;14;1211.435,911.6941;Inherit;False;3;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT;0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;171;-1465.261,936.8015;Inherit;False;TileA;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;46;-2643.739,-203.0534;Inherit;False;MaskG;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.VertexColorNode;2;-2980.264,-41.5391;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.TextureCoordinatesNode;175;-1810.776,683.2686;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.TextureCoordinatesNode;332;2689.537,106.0623;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.SamplerNode;100;-983.5381,-581.6429;Inherit;True;Property;_Ah2;Ah 2;15;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.RangedFloatNode;331;2466.077,122.7312;Inherit;False;Property;_RIpplesTile;RIpples Tile;36;0;Create;True;0;0;0;False;0;False;5;20;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;242;2402.132,1215.586;Inherit;False;Property;_SnowMaskTIle;SnowMaskTIle;25;0;Create;True;0;0;0;False;0;False;1;2;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;188;-1227.728,-507.813;Inherit;False;171;TileA;1;0;OBJECT;;False;1;FLOAT2;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;101;-636.6942,-558.0233;Inherit;False;HeightA;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.TexturePropertyNode;333;2662.155,-128.8928;Inherit;True;Property;_DetailMask2;Detail Mask2;12;0;Create;True;0;0;0;False;0;False;None;8f8f7056e38d7904898641b1b93efa5b;False;white;Auto;Texture2D;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1 Node;AmplifyShaderEditor.RangedFloatNode;335;3175.695,-216.1759;Inherit;False;Property;_GradientTile;Gradient Tile;37;0;Create;True;0;0;0;False;0;False;0;20;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;79;-1482.042,551.2615;Inherit;False;TileR;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.RangedFloatNode;73;-2547.893,262.7738;Inherit;False;Constant;_AH;A H;9;0;Create;True;0;0;0;False;0;False;10;10;0;10;0;1;FLOAT;0 Node;AmplifyShaderEditor.OneMinusNode;110;-2612.107,173.9574;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;176;-1810.976,814.9686;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.GetLocalVarNode;93;-2393.031,115.6904;Inherit;False;101;HeightA;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.TexturePropertyNode;496;-1299.338,-1075.099;Inherit;True;Property;_BaseTexture;Base Texture;13;0;Create;True;0;0;0;False;0;False;None;56d8830df65634a46a36d619b230486b;False;white;Auto;Texture2D;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1 Node;AmplifyShaderEditor.PannerNode;337;3405.967,-106.9108;Inherit;True;3;0;FLOAT2;0,0;False;2;FLOAT2;0.4,0.4;False;1;FLOAT;1;False;1;FLOAT2;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;16;-1805.441,548.1336;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.GetLocalVarNode;78;997.3095,1208.799;Inherit;False;76;MaskA;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.FresnelNode;449;4994.508,1166.815;Inherit;True;Standard;WorldNormal;ViewDir;False;True;5;0;FLOAT3;0,0,1;False;4;FLOAT3;0,0,0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;5;False;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;168;-1472.929,694.1265;Inherit;False;TileG;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;366;6379.826,543.303;Inherit;True;Dis;-1;True;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;224;659.9841,1393.615;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.WireNode;342;5458.233,366.7942;Inherit;False;1;0;SAMPLER2D;;False;1;SAMPLER2D;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;370;3128.915,493.6711;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;367;3330.757,636.1283;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.PannerNode;377;3491.3,501.0232;Inherit;True;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0.1;False;1;FLOAT;1;False;1;FLOAT2;0 Node;AmplifyShaderEditor.WireNode;347;5485.242,267.615;Inherit;False;1;0;SAMPLER2D;;False;1;SAMPLER2D;0 Node;AmplifyShaderEditor.WireNode;409;5304.14,230.0862;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SamplerNode;10;259.3301,509.9286;Inherit;True;Property;_Grassnormal;Grass normal;5;0;Create;True;0;0;0;False;0;False;-1;None;486271256eeb5464eb31d769cd4a023b;True;0;True;bump;Auto;True;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.WireNode;374;4126.25,340.3962;Inherit;False;1;0;SAMPLER2D;;False;1;SAMPLER2D;0 Node;AmplifyShaderEditor.GetLocalVarNode;376;3771.283,461.6321;Inherit;False;366;Dis;1;0;OBJECT;;False;1;FLOAT3;0 Node;AmplifyShaderEditor.GetLocalVarNode;80;-1266.288,-804.1111;Inherit;False;79;TileR;1;0;OBJECT;;False;1;FLOAT2;0 Node;AmplifyShaderEditor.WireNode;406;5286.407,9.780079;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;303;8198.438,220.3099;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;383;4179.946,361.1252;Inherit;False;1;0;SAMPLER2D;;False;1;SAMPLER2D;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;356;4536.183,-20.7209;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleAddOpNode;382;3953.162,478.488;Inherit;True;2;2;0;FLOAT3;0,0,0;False;1;FLOAT2;0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.RangedFloatNode;413;7725.049,750.203;Inherit;False;Property;_RainIntensity;Rain Intensity;28;0;Create;True;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0 Node;AmplifyShaderEditor.ColorNode;497;-894.3031,-1213.658;Inherit;False;Property;_Grass;Grass;1;0;Create;True;0;0;0;False;0;False;0.3411765,0.6352941,0,0;0.6352941,0.5254902,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;414;8066.75,269.0071;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SamplerNode;500;-981.44,-1020.585;Inherit;True;Property;_TextureSample4;Texture Sample 4;42;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.Vector2Node;275;5590.259,-558.0646;Inherit;False;Constant;_Vector0;Vector 0;30;0;Create;True;0;0;0;False;0;False;20,25;0,0;0;3;FLOAT2;0;FLOAT;1;FLOAT;2 Node;AmplifyShaderEditor.ScreenPosInputsNode;363;5514.973,-437.4816;Float;True;0;False;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.WireNode;304;8237.675,240.2048;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;360;5531.299,190.536;Inherit;False;1;0;SAMPLER2D;;False;1;SAMPLER2D;0 Node;AmplifyShaderEditor.WorldPosInputsNode;364;5582.973,-244.4816;Inherit;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 Node;AmplifyShaderEditor.WireNode;352;5495.876,220.4403;Inherit;False;1;0;SAMPLER2D;;False;1;SAMPLER2D;0 Node;AmplifyShaderEditor.WireNode;404;7464.077,273.1121;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;361;3134.236,707.7123;Inherit;False;Property;_FlowSpeed;Flow Speed;33;0;Create;True;0;0;0;False;0;False;1;7;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;233;1475.98,1446.012;Inherit;False;231;SnowMask;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;407;7644.451,226.1741;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SaturateNode;369;4813.623,-86.57101;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.LerpOp;223;1710.357,1340.008;Inherit;True;3;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT;0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.RangedFloatNode;365;4795.861,106.2293;Inherit;False;Constant;_Float0;Float 0;41;0;Create;True;0;0;0;False;0;False;5;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;506;2031.606,967.6789;Inherit;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;375;5006.975,-5.514843;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.VertexColorNode;433;5579.387,521.053;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.WireNode;384;5246.572,60.92607;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;355;3057.148,308.824;Inherit;False;1;0;SAMPLER2D;;False;1;SAMPLER2D;0 Node;AmplifyShaderEditor.LerpOp;36;1460.886,1091.788;Inherit;False;3;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT;0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.WireNode;434;5705.483,875.8118;Inherit;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.DynamicAppendNode;438;5787.4,539.4363;Inherit;False;FLOAT3;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.WireNode;507;2150.442,888.5809;Inherit;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.WireNode;336;3032.109,341.3879;Inherit;False;1;0;SAMPLER2D;;False;1;SAMPLER2D;0 Node;AmplifyShaderEditor.PosVertexDataNode;346;2198.641,476.5413;Inherit;True;0;0;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.WireNode;399;5758.265,265.3679;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;358;6197.954,543.2292;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.DynamicAppendNode;432;2805.258,491.9281;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.WireNode;392;5696.038,75.98126;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;350;5955.471,736.847;Inherit;False;Property;_Distortion;Distortion;32;0;Create;True;0;0;0;False;0;False;0.1;1;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.ObjectToWorldTransfNode;431;2519.258,465.9281;Inherit;False;1;0;FLOAT4;0,0,0,1;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SimpleAddOpNode;436;6003.135,542.3582;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.SimpleTimeNode;357;3119.376,630.4784;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;398;5251.303,-46.10373;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.WireNode;339;3124.217,363.199;Inherit;False;1;0;SAMPLER2D;;False;1;SAMPLER2D;0 Node;AmplifyShaderEditor.WireNode;362;3032.745,590.6741;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.WireNode;387;5617.579,59.74834;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.Vector2Node;349;2835.712,608.8831;Inherit;False;Property;_RainScale;Rain Scale;34;0;Create;True;0;0;0;False;0;False;1,1;-0.4,-0.25;0;3;FLOAT2;0;FLOAT;1;FLOAT;2 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;517;1927.424,-211.0016;Float;False;False;-1;2;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;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;3;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;;False;False;True;1;LightMode=DepthOnly;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;521;1927.424,-151.0016;Float;False;False;-1;2;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;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;3;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalGBuffer;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;518;1927.424,-211.0016;Float;False;False;-1;2;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;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;3;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;Hidden/InternalErrorShader;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;516;1927.424,-211.0016;Float;False;False;-1;2;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;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;3;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;Hidden/InternalErrorShader;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;522;1927.424,-131.0016;Float;False;False;-1;2;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;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;3;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=SceneSelectionPass;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;514;1927.424,-211.0016;Float;False;False;-1;2;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;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;3;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;0;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;515;1927.424,-211.0016;Half;False;True;-1;2;UnityEditor.ShaderGraphLitGUI;0;12;CRS/SetDress/Terrain;94348b07e5e8bab40bd6c8a1e3df54cd;True;Forward;0;1;Forward;19;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;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;3;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForward;False;False;0;Hidden/InternalErrorShader;0;0;Standard;41;Workflow;1;0;Surface;0;0; Refraction Model;0;0; Blend;0;0;Two Sided;1;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; Use Shadow Threshold;0;0;Receive Shadows;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;DOTS Instancing;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;519;1927.424,-211.0016;Float;False;False;-1;2;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;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;3;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;Hidden/InternalErrorShader;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;520;1927.424,-151.0016;Float;False;False;-1;2;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;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;3;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;Hidden/InternalErrorShader;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;523;1927.424,-131.0016;Float;False;False;-1;2;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;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;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.SamplerNode;334;3036.106,43.99639;Inherit;True;Property;_TextureSample1;Texture Sample 1;1;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.TextureCoordinatesNode;241;2615.344,1186.34;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.SaturateNode;219;3649.832,1151.642;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;231;3841.283,1142.124;Inherit;False;SnowMask;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.FunctionNode;211;3411.766,1159.246;Inherit;True;Step Antialiasing;-1;;1;2a825e80dfb3290468194f83380797bd;0;2;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SamplerNode;524;2877.682,1138.702;Inherit;True;Property;_TextureSample5;Texture Sample 1;1;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.RangedFloatNode;190;2908.57,1349.695;Inherit;False;Property;_SummerToWinter;SummerToWinter;0;0;Create;True;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0 WireConnection;317;0;314;0 WireConnection;317;1;312;0 WireConnection;321;0;318;0 WireConnection;313;0;310;0 WireConnection;312;0;309;0 WireConnection;312;1;307;0 WireConnection;395;0;390;4 WireConnection;395;1;391;4 WireConnection;391;0;380;0 WireConnection;391;1;385;0 WireConnection;401;0;397;0 WireConnection;401;1;395;0 WireConnection;314;0;429;0 WireConnection;314;1;311;0 WireConnection;429;0;308;0 WireConnection;323;0;317;0 WireConnection;323;1;315;0 WireConnection;322;0;315;0 WireConnection;410;0;401;0 WireConnection;410;1;405;0 WireConnection;326;0;315;0 WireConnection;326;1;323;0 WireConnection;326;2;321;0 WireConnection;426;0;34;0 WireConnection;34;0;8;0 WireConnection;34;1;33;0 WireConnection;34;2;77;0 WireConnection;390;0;280;0 WireConnection;390;1;279;0 WireConnection;393;0;389;0 WireConnection;276;0;275;0 WireConnection;276;1;363;0 WireConnection;498;0;497;0 WireConnection;498;1;500;2 WireConnection;318;0;313;0 WireConnection;310;0;413;0 WireConnection;3;0;498;0 WireConnection;3;1;501;0 WireConnection;3;2;53;0 WireConnection;380;0;373;0 WireConnection;306;0;305;0 WireConnection;379;0;371;0 WireConnection;278;0;276;0 WireConnection;278;1;277;0 WireConnection;278;2;372;0 WireConnection;400;0;393;0 WireConnection;400;1;393;1 WireConnection;8;0;3;0 WireConnection;8;1;503;0 WireConnection;8;2;54;0 WireConnection;277;0;275;0 WireConnection;277;1;364;0 WireConnection;385;0;379;0 WireConnection;385;1;381;0 WireConnection;33;1;180;0 WireConnection;279;0;278;0 WireConnection;279;1;378;0 WireConnection;403;0;400;0 WireConnection;324;0;322;0 WireConnection;286;0;410;0 WireConnection;330;0;328;0 WireConnection;416;0;415;0 WireConnection;280;0;380;0 WireConnection;281;0;390;4 WireConnection;281;1;391;4 WireConnection;144;0;140;0 WireConnection;144;1;141;0 WireConnection;144;2;145;0 WireConnection;418;0;417;0 WireConnection;420;0;418;0 WireConnection;415;0;411;0 WireConnection;492;0;191;0 WireConnection;492;1;493;0 WireConnection;447;0;444;0 WireConnection;421;0;419;0 WireConnection;421;1;420;0 WireConnection;316;0;413;0 WireConnection;512;0;421;0 WireConnection;512;1;513;0 WireConnection;424;0;149;0 WireConnection;319;0;316;0 WireConnection;147;0;144;0 WireConnection;147;1;142;0 WireConnection;147;2;146;0 WireConnection;149;0;147;0 WireConnection;149;1;143;0 WireConnection;149;2;148;0 WireConnection;411;0;408;0 WireConnection;320;0;512;0 WireConnection;320;1;308;0 WireConnection;189;0;34;0 WireConnection;189;1;492;0 WireConnection;189;2;232;0 WireConnection;417;0;416;0 WireConnection;423;1;422;0 WireConnection;505;1;189;0 WireConnection;505;0;427;0 WireConnection;72;0;93;0 WireConnection;72;1;110;0 WireConnection;72;2;73;0 WireConnection;116;0;2;1 WireConnection;450;0;449;0 WireConnection;408;0;403;0 WireConnection;453;1;452;0 WireConnection;453;2;494;0 WireConnection;328;1;324;0 WireConnection;328;0;326;0 WireConnection;325;0;425;0 WireConnection;325;1;320;0 WireConnection;325;2;319;0 WireConnection;327;1;425;0 WireConnection;327;0;325;0 WireConnection;329;0;327;0 WireConnection;455;0;453;0 WireConnection;444;0;443;0 WireConnection;452;0;451;0 WireConnection;452;1;450;0 WireConnection;389;0;383;0 WireConnection;389;1;382;0 WireConnection;305;0;304;0 WireConnection;305;1;414;0 WireConnection;305;2;413;0 WireConnection;283;0;282;0 WireConnection;283;1;281;0 WireConnection;368;0;355;0 WireConnection;412;0;409;0 WireConnection;136;0;72;0 WireConnection;341;0;334;2 WireConnection;11;1;182;0 WireConnection;47;0;2;3 WireConnection;344;0;333;0 WireConnection;344;1;340;0 WireConnection;12;1;183;0 WireConnection;13;0;10;0 WireConnection;13;1;11;0 WireConnection;13;2;61;0 WireConnection;177;0;15;0 WireConnection;76;0;136;0 WireConnection;35;1;184;0 WireConnection;222;1;224;0 WireConnection;373;0;360;0 WireConnection;354;0;344;1 WireConnection;354;1;345;0 WireConnection;345;0;341;0 WireConnection;169;0;176;0 WireConnection;338;0;335;0 WireConnection;340;0;338;0 WireConnection;340;1;337;0 WireConnection;14;0;13;0 WireConnection;14;1;12;0 WireConnection;14;2;62;0 WireConnection;171;0;177;0 WireConnection;46;0;2;2 WireConnection;175;0;15;0 WireConnection;332;0;331;0 WireConnection;100;0;496;0 WireConnection;100;1;188;0 WireConnection;101;0;100;1 WireConnection;79;0;16;0 WireConnection;110;0;2;4 WireConnection;176;0;15;0 WireConnection;337;0;334;2 WireConnection;16;0;15;0 WireConnection;449;0;445;0 WireConnection;449;4;447;0 WireConnection;449;2;448;0 WireConnection;449;3;446;0 WireConnection;168;0;175;0 WireConnection;366;0;358;0 WireConnection;224;0;225;0 WireConnection;342;0;339;0 WireConnection;370;0;432;0 WireConnection;370;1;362;0 WireConnection;367;0;357;0 WireConnection;367;1;361;0 WireConnection;377;0;370;0 WireConnection;377;1;367;0 WireConnection;347;0;342;0 WireConnection;409;0;406;0 WireConnection;10;1;181;0 WireConnection;374;0;368;0 WireConnection;406;0;398;0 WireConnection;303;0;407;0 WireConnection;383;0;374;0 WireConnection;356;0;354;0 WireConnection;356;1;348;0 WireConnection;382;0;376;0 WireConnection;382;1;377;0 WireConnection;414;0;412;0 WireConnection;414;1;413;0 WireConnection;500;0;496;0 WireConnection;500;1;80;0 WireConnection;304;0;303;0 WireConnection;360;0;352;0 WireConnection;352;0;347;0 WireConnection;404;0;399;0 WireConnection;407;0;404;0 WireConnection;369;0;356;0 WireConnection;223;0;36;0 WireConnection;223;1;222;0 WireConnection;223;2;233;0 WireConnection;506;0;223;0 WireConnection;375;0;369;0 WireConnection;375;1;365;0 WireConnection;384;0;375;0 WireConnection;355;0;333;0 WireConnection;36;0;14;0 WireConnection;36;1;35;0 WireConnection;36;2;78;0 WireConnection;434;0;507;0 WireConnection;438;0;433;1 WireConnection;438;1;433;2 WireConnection;438;2;433;3 WireConnection;507;0;506;0 WireConnection;336;0;333;0 WireConnection;399;0;392;0 WireConnection;358;0;436;0 WireConnection;358;1;350;0 WireConnection;432;0;431;1 WireConnection;432;1;431;3 WireConnection;392;0;387;0 WireConnection;431;0;346;0 WireConnection;436;0;438;0 WireConnection;436;1;434;0 WireConnection;398;0;369;0 WireConnection;339;0;336;0 WireConnection;362;0;349;0 WireConnection;387;0;384;0 WireConnection;515;0;505;0 WireConnection;515;1;223;0 WireConnection;515;2;457;0 WireConnection;515;4;428;0 WireConnection;334;0;333;0 WireConnection;334;1;332;0 WireConnection;241;0;242;0 WireConnection;219;0;211;0 WireConnection;231;0;219;0 WireConnection;211;1;524;3 WireConnection;211;2;190;0 WireConnection;524;0;333;0 WireConnection;524;1;241;0 ASEEND*/ //CHKSM=A146A8572687003B935BE291D83BF55B6A5CDDD4