// Made with Amplify Shader Editor // Available at the Unity Asset Store - http://u3d.as/y3X Shader "ASE/Stone" { Properties { [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1) [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5 [ASEBegin]_Color("Color", Color) = (0,0,0,0) [NoScaleOffset]_MainTex("MainTex", 2D) = "white" {} [NoScaleOffset][Normal]_MainNormalTex("MainNormalTex", 2D) = "bump" {} [NoScaleOffset]_MainRoughTex("MainRoughTex", 2D) = "white" {} [NoScaleOffset]_SecondTex("SecondTex", 2D) = "white" {} _Color0("Color 0", Color) = (0.4899876,0.7264151,0.5653766,0) [NoScaleOffset][Normal]_SecondNormalTex("SecondNormalTex", 2D) = "bump" {} _UvTilling("UvTilling", Vector) = (0,0,0,0) [NoScaleOffset]_SecondRoughTex("SecondRoughTex", 2D) = "white" {} _Smoothness("Smoothness", Vector) = (0,0,0,0) _Slope("Slope", Float) = 0 _WaterColor("WaterColor", Color) = (0,0,0,0) _WaterNoiseScale("WaterNoiseScale", Vector) = (0,0,0,0) [Normal]_WaterWaveNormal("WaterWaveNormal", 2D) = "bump" {} _WaterWaveNormalScale("WaterWaveNormalScale", Vector) = (0,0,0,0) _WaterWaveNoiseScale("WaterWaveNoiseScale", Float) = 0 _WaterWaveSpeedDir("WaterWaveSpeedDir", Vector) = (0,0,0,0) _RippleMask("RippleMask", 2D) = "white" {} _RippleScaleA("RippleScaleA", Float) = 30 _RippleScaleB("RippleScaleB", Float) = 50 _RippleMaskStrength("RippleMaskStrength", Float) = 0.75 _RippleStrength("RippleStrength", Range( 0 , 1)) = 1 _Rainny("Rainny", Float) = 0 _SnowColor("SnowColor", Color) = (0.7008722,0.8192374,0.8490566,0) _SnowNoiseScale("SnowNoiseScale", Vector) = (0,0,0,0) [Normal]_SnowNormalTex("SnowNormalTex", 2D) = "bump" {} _SnowNormalStrength("SnowNormalStrength", Float) = 0 [ASEEnd]_Snownny("Snownny", Float) = 0 [HideInInspector] _texcoord( "", 2D ) = "white" {} //_TransmissionShadow( "Transmission Shadow", Range( 0, 1 ) ) = 0.5 //_TransStrength( "Trans Strength", Range( 0, 50 ) ) = 1 //_TransNormal( "Trans Normal Distortion", Range( 0, 1 ) ) = 0.5 //_TransScattering( "Trans Scattering", Range( 1, 50 ) ) = 2 //_TransDirect( "Trans Direct", Range( 0, 1 ) ) = 0.9 //_TransAmbient( "Trans Ambient", Range( 0, 1 ) ) = 0.1 //_TransShadow( "Trans Shadow", Range( 0, 1 ) ) = 0.5 //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5 //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16 //_TessMin( "Tess Min Distance", Float ) = 10 //_TessMax( "Tess Max Distance", Float ) = 25 //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16 //_TessMaxDisp( "Tess Max Displacement", Float ) = 25 } SubShader { LOD 0 Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Opaque" "Queue"="Geometry" } Cull Back AlphaToMask Off HLSLINCLUDE #pragma target 2.0 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; } 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 multi_compile _ LOD_FADE_CROSSFADE #pragma multi_compile_fog #define ASE_FOG 1 #define _NORMALMAP 1 #define ASE_SRP_VERSION 999999 #pragma prefer_hlslcc gles #pragma exclude_renderers d3d11_9x #pragma multi_compile _ _SCREEN_SPACE_OCCLUSION #pragma multi_compile _ _MAIN_LIGHT_SHADOWS #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS #pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS #pragma multi_compile _ _SHADOWS_SOFT #pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE #pragma multi_compile _ DIRLIGHTMAP_COMBINED #pragma multi_compile _ LIGHTMAP_ON #pragma vertex vert #pragma fragment frag #define SHADERPASS_FORWARD #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.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/UnityInstancing.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #if ASE_SRP_VERSION <= 70108 #define REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR #endif #if defined(UNITY_INSTANCING_ENABLED) && defined(_TERRAIN_INSTANCED_PERPIXEL_NORMAL) #define ENABLE_TERRAIN_PERPIXEL_NORMAL #endif #define ASE_NEEDS_FRAG_WORLD_POSITION #define ASE_NEEDS_FRAG_WORLD_NORMAL #define ASE_NEEDS_FRAG_WORLD_TANGENT #define ASE_NEEDS_FRAG_WORLD_BITANGENT struct VertexInput { float4 vertex : POSITION; float3 ase_normal : NORMAL; float4 ase_tangent : TANGENT; float4 texcoord1 : TEXCOORD1; float4 texcoord : TEXCOORD0; 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 float4 ase_texcoord7 : TEXCOORD7; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) float4 _Color; float4 _SnowNormalTex_ST; float4 _WaterWaveSpeedDir; float4 _SnowColor; float4 _WaterNoiseScale; float4 _SnowNoiseScale; float4 _WaterColor; float4 _Color0; float4 _UvTilling; float2 _WaterWaveNormalScale; float2 _Smoothness; float _Slope; float _Snownny; float _SnowNormalStrength; float _WaterWaveNoiseScale; float _RippleScaleA; float _RippleScaleB; float _RippleMaskStrength; float _RippleStrength; float _Rainny; #ifdef _TRANSMISSION_ASE float _TransmissionShadow; #endif #ifdef _TRANSLUCENCY_ASE float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef TESSELLATION_ON float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END sampler2D _MainTex; sampler2D _SecondTex; sampler2D _MainNormalTex; sampler2D _SecondNormalTex; sampler2D _WaterWaveNormal; sampler2D _RippleMask; sampler2D _SnowNormalTex; sampler2D _MainRoughTex; sampler2D _SecondRoughTex; inline float noise_randomValue (float2 uv) { return frac(sin(dot(uv, float2(12.9898, 78.233)))*43758.5453); } inline float noise_interpolate (float a, float b, float t) { return (1.0-t)*a + (t*b); } inline float valueNoise (float2 uv) { float2 i = floor(uv); float2 f = frac( uv ); f = f* f * (3.0 - 2.0 * f); uv = abs( frac(uv) - 0.5); float2 c0 = i + float2( 0.0, 0.0 ); float2 c1 = i + float2( 1.0, 0.0 ); float2 c2 = i + float2( 0.0, 1.0 ); float2 c3 = i + float2( 1.0, 1.0 ); float r0 = noise_randomValue( c0 ); float r1 = noise_randomValue( c1 ); float r2 = noise_randomValue( c2 ); float r3 = noise_randomValue( c3 ); float bottomOfGrid = noise_interpolate( r0, r1, f.x ); float topOfGrid = noise_interpolate( r2, r3, f.x ); float t = noise_interpolate( bottomOfGrid, topOfGrid, f.y ); return t; } float SimpleNoise(float2 UV) { float t = 0.0; float freq = pow( 2.0, float( 0 ) ); float amp = pow( 0.5, float( 3 - 0 ) ); t += valueNoise( UV/freq )*amp; freq = pow(2.0, float(1)); amp = pow(0.5, float(3-1)); t += valueNoise( UV/freq )*amp; freq = pow(2.0, float(2)); amp = pow(0.5, float(3-2)); t += valueNoise( UV/freq )*amp; return t; } float3 mod2D289( float3 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; } float2 mod2D289( float2 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; } float3 permute( float3 x ) { return mod2D289( ( ( x * 34.0 ) + 1.0 ) * x ); } float snoise( float2 v ) { const float4 C = float4( 0.211324865405187, 0.366025403784439, -0.577350269189626, 0.024390243902439 ); float2 i = floor( v + dot( v, C.yy ) ); float2 x0 = v - i + dot( i, C.xx ); float2 i1; i1 = ( x0.x > x0.y ) ? float2( 1.0, 0.0 ) : float2( 0.0, 1.0 ); float4 x12 = x0.xyxy + C.xxzz; x12.xy -= i1; i = mod2D289( i ); float3 p = permute( permute( i.y + float3( 0.0, i1.y, 1.0 ) ) + i.x + float3( 0.0, i1.x, 1.0 ) ); float3 m = max( 0.5 - float3( dot( x0, x0 ), dot( x12.xy, x12.xy ), dot( x12.zw, x12.zw ) ), 0.0 ); m = m * m; m = m * m; float3 x = 2.0 * frac( p * C.www ) - 1.0; float3 h = abs( x ) - 0.5; float3 ox = floor( x + 0.5 ); float3 a0 = x - ox; m *= 1.79284291400159 - 0.85373472095314 * ( a0 * a0 + h * h ); float3 g; g.x = a0.x * x0.x + h.x * x0.y; g.yz = a0.yz * x12.xz + h.yz * x12.yw; return 130.0 * dot( m, g ); } float3 PerturbNormal107_g34( float3 surf_pos, float3 surf_norm, float height, float scale ) { // "Bump Mapping Unparametrized Surfaces on the GPU" by Morten S. Mikkelsen float3 vSigmaS = ddx( surf_pos ); float3 vSigmaT = ddy( surf_pos ); float3 vN = surf_norm; float3 vR1 = cross( vSigmaT , vN ); float3 vR2 = cross( vN , vSigmaS ); float fDet = dot( vSigmaS , vR1 ); float dBs = ddx( height ); float dBt = ddy( height ); float3 vSurfGrad = scale * 0.05 * sign( fDet ) * ( dBs * vR1 + dBt * vR2 ); return normalize ( abs( fDet ) * vN - vSurfGrad ); } 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_texcoord7.xy = v.texcoord.xy; //setting value to unused interpolator channels and avoid initialization warnings o.ase_texcoord7.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); OUTPUT_LIGHTMAP_UV( v.texcoord1, unity_LightmapST, o.lightmapUVOrVertexSH.xy ); OUTPUT_SH( normalInput.normalWS.xyz, o.lightmapUVOrVertexSH.xyz ); #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(TESSELLATION_ON) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 ase_normal : NORMAL; float4 ase_tangent : TANGENT; float4 texcoord : TEXCOORD0; float4 texcoord1 : TEXCOORD1; 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; 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; #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); #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 #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) ShadowCoords = IN.shadowCoord; #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); #endif WorldViewDirection = SafeNormalize( WorldViewDirection ); float4 lerpResult52 = lerp( float4( 1,1,1,1 ) , _Color , _Color.a); float2 appendResult58 = (float2(_UvTilling.x , _UvTilling.y)); float2 temp_output_22_0 = ( IN.ase_texcoord7.xy * appendResult58 ); float2 appendResult59 = (float2(( WorldPosition.x * _UvTilling.z ) , ( WorldPosition.z * _UvTilling.w ))); float dotResult19 = dot( WorldNormal , float3(0,1,0) ); float temp_output_36_0 = saturate( ( dotResult19 * _Slope ) ); float4 lerpResult11 = lerp( ( lerpResult52 * tex2D( _MainTex, temp_output_22_0 ) ) , ( tex2D( _SecondTex, appendResult59 ) * _Color0 ) , temp_output_36_0); float2 appendResult66 = (float2(WorldPosition.x , WorldPosition.z)); float simpleNoise62 = SimpleNoise( appendResult66*_WaterNoiseScale.x ); float simpleNoise97 = SimpleNoise( appendResult66*_WaterNoiseScale.y ); float dotResult69 = dot( WorldNormal , float3( 0,1,0 ) ); float temp_output_70_0 = ( ( _Rainny * ( 1.0 - saturate( ( pow( ( simpleNoise62 * simpleNoise97 ) , _WaterNoiseScale.z ) * _WaterNoiseScale.w ) ) ) ) * dotResult69 ); float4 lerpResult95 = lerp( lerpResult11 , _WaterColor , temp_output_70_0); float2 appendResult129 = (float2(WorldPosition.x , WorldPosition.z)); float simpleNoise131 = SimpleNoise( appendResult129*_SnowNoiseScale.x ); float simpleNoise132 = SimpleNoise( appendResult129*_SnowNoiseScale.y ); float dotResult140 = dot( WorldNormal , float3( 0,1,0 ) ); float temp_output_142_0 = ( ( _Snownny * ( 1.0 - saturate( ( pow( ( simpleNoise131 * simpleNoise132 ) , _SnowNoiseScale.z ) * _SnowNoiseScale.w ) ) ) ) * dotResult140 ); float4 lerpResult146 = lerp( lerpResult95 , _SnowColor , temp_output_142_0); float3 lerpResult17 = lerp( UnpackNormalScale( tex2D( _MainNormalTex, temp_output_22_0 ), 1.0f ) , UnpackNormalScale( tex2D( _SecondNormalTex, appendResult59 ), 1.0f ) , temp_output_36_0); float2 appendResult76 = (float2(WorldPosition.x , WorldPosition.z)); float2 temp_output_78_0 = ( appendResult76 * _WaterWaveNoiseScale ); float2 appendResult91 = (float2(_WaterWaveSpeedDir.x , _WaterWaveSpeedDir.y)); float3 unpack85 = UnpackNormalScale( tex2D( _WaterWaveNormal, ( temp_output_78_0 + ( _TimeParameters.x * appendResult91 ) ) ), _WaterWaveNormalScale.x ); unpack85.z = lerp( 1, unpack85.z, saturate(_WaterWaveNormalScale.x) ); float2 appendResult92 = (float2(_WaterWaveSpeedDir.z , _WaterWaveSpeedDir.w)); float3 unpack86 = UnpackNormalScale( tex2D( _WaterWaveNormal, ( temp_output_78_0 + ( _TimeParameters.x * appendResult92 ) ) ), _WaterWaveNormalScale.y ); unpack86.z = lerp( 1, unpack86.z, saturate(_WaterWaveNormalScale.y) ); float3 surf_pos107_g34 = WorldPosition; float3 surf_norm107_g34 = WorldNormal; float2 temp_output_87_0_g33 = ( (WorldPosition).xz * 0.1 ); float2 temp_output_62_0_g33 = ( temp_output_87_0_g33 * _RippleScaleA ); float simplePerlin2D74_g33 = snoise( ( floor( temp_output_62_0_g33 ) + ( _TimeParameters.x * float2( 0,1 ) ) ) ); simplePerlin2D74_g33 = simplePerlin2D74_g33*0.5 + 0.5; float saferPower31_g33 = max( simplePerlin2D74_g33 , 0.0001 ); float temp_output_33_0_g33 = sin( saturate( ( pow( saferPower31_g33 , 5.0 ) * 1.0 ) ) ); float2 temp_output_70_0_g33 = ( temp_output_87_0_g33 * _RippleScaleB ); float simplePerlin2D39_g33 = snoise( ( floor( temp_output_70_0_g33 ) + ( _TimeParameters.x * float2( 1,0 ) ) ) ); simplePerlin2D39_g33 = simplePerlin2D39_g33*0.5 + 0.5; float saferPower40_g33 = max( simplePerlin2D39_g33 , 0.0001 ); float temp_output_42_0_g33 = sin( saturate( ( pow( saferPower40_g33 , 5.0 ) * 1.0 ) ) ); float rippleMask51_g33 = saturate( ( ( tex2D( _RippleMask, ( ( ( frac( temp_output_62_0_g33 ) - float2( 0.5,0.5 ) ) * (2.0 + (temp_output_33_0_g33 - -1.0) * (1.0 - 2.0) / (1.0 - -1.0)) ) + float2( 0.5,0.5 ) ) ).r * temp_output_33_0_g33 ) + ( tex2D( _RippleMask, ( ( ( frac( temp_output_70_0_g33 ) - float2( 0.5,0.5 ) ) * (2.0 + (temp_output_42_0_g33 - -1.0) * (1.0 - 2.0) / (1.0 - -1.0)) ) + float2( 0.5,0.5 ) ) ).r * temp_output_42_0_g33 ) ) ); float height107_g34 = ( rippleMask51_g33 * _RippleMaskStrength ); float scale107_g34 = _RippleStrength; float3 localPerturbNormal107_g34 = PerturbNormal107_g34( surf_pos107_g34 , surf_norm107_g34 , height107_g34 , scale107_g34 ); float3x3 ase_worldToTangent = float3x3(WorldTangent,WorldBiTangent,WorldNormal); float3 worldToTangentDir42_g34 = mul( ase_worldToTangent, localPerturbNormal107_g34); float3 lerpResult39 = lerp( lerpResult17 , BlendNormal( BlendNormal( unpack85 , unpack86 ) , worldToTangentDir42_g34 ) , temp_output_70_0); float2 uv_SnowNormalTex = IN.ase_texcoord7.xy * _SnowNormalTex_ST.xy + _SnowNormalTex_ST.zw; float3 unpack145 = UnpackNormalScale( tex2D( _SnowNormalTex, uv_SnowNormalTex ), _SnowNormalStrength ); unpack145.z = lerp( 1, unpack145.z, saturate(_SnowNormalStrength) ); float3 lerpResult147 = lerp( lerpResult39 , unpack145 , temp_output_142_0); float lerpResult16 = lerp( ( ( 1.0 - tex2D( _MainRoughTex, temp_output_22_0 ).r ) * _Smoothness.x ) , ( ( 1.0 - tex2D( _SecondRoughTex, appendResult59 ).r ) * _Smoothness.y ) , temp_output_36_0); float lerpResult40 = lerp( saturate( lerpResult16 ) , 1.0 , temp_output_70_0); float lerpResult148 = lerp( lerpResult40 , 0.5 , temp_output_142_0); float3 Albedo = lerpResult146.rgb; float3 Normal = lerpResult147; float3 Emission = 0; float3 Specular = 0.5; float Metallic = 0; float Smoothness = lerpResult148; 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 _ALPHATEST_ON clip(Alpha - AlphaClipThreshold); #endif InputData inputData; inputData.positionWS = WorldPosition; inputData.viewDirectionWS = WorldViewDirection; 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 inputData.normalWS = NormalizeNormalPerPixel(inputData.normalWS); #else inputData.normalWS = WorldNormal; #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 inputData.bakedGI = SAMPLE_GI( IN.lightmapUVOrVertexSH.xy, SH, inputData.normalWS ); #ifdef _ASE_BAKEDGI inputData.bakedGI = BakedGI; #endif inputData.normalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(IN.clipPos); inputData.shadowMask = SAMPLE_SHADOWMASK(IN.lightmapUVOrVertexSH.xy); half4 color = UniversalFragmentPBR( inputData, Albedo, Metallic, Specular, Smoothness, Occlusion, Emission, Alpha); #ifdef _TRANSMISSION_ASE { 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 += Albedo * 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 += Albedo * transmission; } #endif } #endif #ifdef _TRANSLUCENCY_ASE { 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 += Albedo * 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 += Albedo * translucency * strength; } #endif } #endif #ifdef _REFRACTION_ASE float4 projScreenPos = ScreenPos / ScreenPos.w; float3 refractionOffset = ( RefractionIndex - 1.0 ) * mul( UNITY_MATRIX_V, WorldNormal ).xyz * ( 1.0 - dot( WorldNormal, WorldViewDirection ) ); projScreenPos.xy += refractionOffset.xy; float3 refraction = SHADERGRAPH_SAMPLE_SCENE_COLOR( projScreenPos ) * 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 return color; } ENDHLSL } Pass { Name "ShadowCaster" Tags { "LightMode"="ShadowCaster" } ZWrite On ZTest LEqual AlphaToMask Off HLSLPROGRAM #define _NORMAL_DROPOFF_TS 1 #pragma multi_compile_instancing #pragma multi_compile _ LOD_FADE_CROSSFADE #pragma multi_compile_fog #define ASE_FOG 1 #define _NORMALMAP 1 #define ASE_SRP_VERSION 999999 #pragma prefer_hlslcc gles #pragma exclude_renderers d3d11_9x #pragma vertex vert #pragma fragment frag #define SHADERPASS_SHADOWCASTER #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/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.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) float4 _Color; float4 _SnowNormalTex_ST; float4 _WaterWaveSpeedDir; float4 _SnowColor; float4 _WaterNoiseScale; float4 _SnowNoiseScale; float4 _WaterColor; float4 _Color0; float4 _UvTilling; float2 _WaterWaveNormalScale; float2 _Smoothness; float _Slope; float _Snownny; float _SnowNormalStrength; float _WaterWaveNoiseScale; float _RippleScaleA; float _RippleScaleB; float _RippleMaskStrength; float _RippleStrength; float _Rainny; #ifdef _TRANSMISSION_ASE float _TransmissionShadow; #endif #ifdef _TRANSLUCENCY_ASE float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef TESSELLATION_ON float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END float3 _LightDirection; 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); float4 clipPos = TransformWorldToHClip( ApplyShadowBias( positionWS, normalWS, _LightDirection ) ); #if UNITY_REVERSED_Z clipPos.z = min(clipPos.z, clipPos.w * UNITY_NEAR_CLIP_VALUE); #else clipPos.z = max(clipPos.z, clipPos.w * 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(TESSELLATION_ON) 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 { 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 _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 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 _ LOD_FADE_CROSSFADE #pragma multi_compile_fog #define ASE_FOG 1 #define _NORMALMAP 1 #define ASE_SRP_VERSION 999999 #pragma prefer_hlslcc gles #pragma exclude_renderers d3d11_9x #pragma vertex vert #pragma fragment frag #define SHADERPASS_DEPTHONLY #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/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.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) float4 _Color; float4 _SnowNormalTex_ST; float4 _WaterWaveSpeedDir; float4 _SnowColor; float4 _WaterNoiseScale; float4 _SnowNoiseScale; float4 _WaterColor; float4 _Color0; float4 _UvTilling; float2 _WaterWaveNormalScale; float2 _Smoothness; float _Slope; float _Snownny; float _SnowNormalStrength; float _WaterWaveNoiseScale; float _RippleScaleA; float _RippleScaleB; float _RippleMaskStrength; float _RippleStrength; float _Rainny; #ifdef _TRANSMISSION_ASE float _TransmissionShadow; #endif #ifdef _TRANSLUCENCY_ASE float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef TESSELLATION_ON float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END 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(TESSELLATION_ON) 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 { 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 _ALPHATEST_ON clip(Alpha - AlphaClipThreshold); #endif #ifdef LOD_FADE_CROSSFADE LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); #endif return 0; } ENDHLSL } Pass { Name "Meta" Tags { "LightMode"="Meta" } Cull Off HLSLPROGRAM #define _NORMAL_DROPOFF_TS 1 #pragma multi_compile_instancing #pragma multi_compile _ LOD_FADE_CROSSFADE #pragma multi_compile_fog #define ASE_FOG 1 #define _NORMALMAP 1 #define ASE_SRP_VERSION 999999 #pragma prefer_hlslcc gles #pragma exclude_renderers d3d11_9x #pragma vertex vert #pragma fragment frag #define SHADERPASS_META #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/MetaInput.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #define ASE_NEEDS_FRAG_WORLD_POSITION #define ASE_NEEDS_VERT_NORMAL #pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A struct VertexInput { float4 vertex : POSITION; float3 ase_normal : NORMAL; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; float4 ase_texcoord : TEXCOORD0; 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_texcoord3 : TEXCOORD3; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) float4 _Color; float4 _SnowNormalTex_ST; float4 _WaterWaveSpeedDir; float4 _SnowColor; float4 _WaterNoiseScale; float4 _SnowNoiseScale; float4 _WaterColor; float4 _Color0; float4 _UvTilling; float2 _WaterWaveNormalScale; float2 _Smoothness; float _Slope; float _Snownny; float _SnowNormalStrength; float _WaterWaveNoiseScale; float _RippleScaleA; float _RippleScaleB; float _RippleMaskStrength; float _RippleStrength; float _Rainny; #ifdef _TRANSMISSION_ASE float _TransmissionShadow; #endif #ifdef _TRANSLUCENCY_ASE float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef TESSELLATION_ON float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END sampler2D _MainTex; sampler2D _SecondTex; inline float noise_randomValue (float2 uv) { return frac(sin(dot(uv, float2(12.9898, 78.233)))*43758.5453); } inline float noise_interpolate (float a, float b, float t) { return (1.0-t)*a + (t*b); } inline float valueNoise (float2 uv) { float2 i = floor(uv); float2 f = frac( uv ); f = f* f * (3.0 - 2.0 * f); uv = abs( frac(uv) - 0.5); float2 c0 = i + float2( 0.0, 0.0 ); float2 c1 = i + float2( 1.0, 0.0 ); float2 c2 = i + float2( 0.0, 1.0 ); float2 c3 = i + float2( 1.0, 1.0 ); float r0 = noise_randomValue( c0 ); float r1 = noise_randomValue( c1 ); float r2 = noise_randomValue( c2 ); float r3 = noise_randomValue( c3 ); float bottomOfGrid = noise_interpolate( r0, r1, f.x ); float topOfGrid = noise_interpolate( r2, r3, f.x ); float t = noise_interpolate( bottomOfGrid, topOfGrid, f.y ); return t; } float SimpleNoise(float2 UV) { float t = 0.0; float freq = pow( 2.0, float( 0 ) ); float amp = pow( 0.5, float( 3 - 0 ) ); t += valueNoise( UV/freq )*amp; freq = pow(2.0, float(1)); amp = pow(0.5, float(3-1)); t += valueNoise( UV/freq )*amp; freq = pow(2.0, float(2)); amp = pow(0.5, float(3-2)); t += valueNoise( UV/freq )*amp; return t; } 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); float3 ase_worldNormal = TransformObjectToWorldNormal(v.ase_normal); o.ase_texcoord3.xyz = ase_worldNormal; o.ase_texcoord2.xy = v.ase_texcoord.xy; //setting value to unused interpolator channels and avoid initialization warnings o.ase_texcoord2.zw = 0; o.ase_texcoord3.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 ); #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(TESSELLATION_ON) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 ase_normal : NORMAL; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.vertex; o.ase_normal = v.ase_normal; o.texcoord1 = v.texcoord1; o.texcoord2 = v.texcoord2; o.ase_texcoord = v.ase_texcoord; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if 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.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_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.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 float4 lerpResult52 = lerp( float4( 1,1,1,1 ) , _Color , _Color.a); float2 appendResult58 = (float2(_UvTilling.x , _UvTilling.y)); float2 temp_output_22_0 = ( IN.ase_texcoord2.xy * appendResult58 ); float2 appendResult59 = (float2(( WorldPosition.x * _UvTilling.z ) , ( WorldPosition.z * _UvTilling.w ))); float3 ase_worldNormal = IN.ase_texcoord3.xyz; float dotResult19 = dot( ase_worldNormal , float3(0,1,0) ); float temp_output_36_0 = saturate( ( dotResult19 * _Slope ) ); float4 lerpResult11 = lerp( ( lerpResult52 * tex2D( _MainTex, temp_output_22_0 ) ) , ( tex2D( _SecondTex, appendResult59 ) * _Color0 ) , temp_output_36_0); float2 appendResult66 = (float2(WorldPosition.x , WorldPosition.z)); float simpleNoise62 = SimpleNoise( appendResult66*_WaterNoiseScale.x ); float simpleNoise97 = SimpleNoise( appendResult66*_WaterNoiseScale.y ); float dotResult69 = dot( ase_worldNormal , float3( 0,1,0 ) ); float temp_output_70_0 = ( ( _Rainny * ( 1.0 - saturate( ( pow( ( simpleNoise62 * simpleNoise97 ) , _WaterNoiseScale.z ) * _WaterNoiseScale.w ) ) ) ) * dotResult69 ); float4 lerpResult95 = lerp( lerpResult11 , _WaterColor , temp_output_70_0); float2 appendResult129 = (float2(WorldPosition.x , WorldPosition.z)); float simpleNoise131 = SimpleNoise( appendResult129*_SnowNoiseScale.x ); float simpleNoise132 = SimpleNoise( appendResult129*_SnowNoiseScale.y ); float dotResult140 = dot( ase_worldNormal , float3( 0,1,0 ) ); float temp_output_142_0 = ( ( _Snownny * ( 1.0 - saturate( ( pow( ( simpleNoise131 * simpleNoise132 ) , _SnowNoiseScale.z ) * _SnowNoiseScale.w ) ) ) ) * dotResult140 ); float4 lerpResult146 = lerp( lerpResult95 , _SnowColor , temp_output_142_0); float3 Albedo = lerpResult146.rgb; float3 Emission = 0; float Alpha = 1; float AlphaClipThreshold = 0.5; #ifdef _ALPHATEST_ON clip(Alpha - AlphaClipThreshold); #endif MetaInput metaInput = (MetaInput)0; metaInput.Albedo = Albedo; metaInput.Emission = Emission; return MetaFragment(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 #pragma multi_compile_instancing #pragma multi_compile _ LOD_FADE_CROSSFADE #pragma multi_compile_fog #define ASE_FOG 1 #define _NORMALMAP 1 #define ASE_SRP_VERSION 999999 #pragma enable_d3d11_debug_symbols #pragma prefer_hlslcc gles #pragma exclude_renderers d3d11_9x #pragma vertex vert #pragma fragment frag #define SHADERPASS_2D #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.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/UnityInstancing.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #define ASE_NEEDS_FRAG_WORLD_POSITION #define ASE_NEEDS_VERT_NORMAL #pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A struct VertexInput { float4 vertex : POSITION; float3 ase_normal : NORMAL; float4 ase_texcoord : TEXCOORD0; 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_texcoord3 : TEXCOORD3; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) float4 _Color; float4 _SnowNormalTex_ST; float4 _WaterWaveSpeedDir; float4 _SnowColor; float4 _WaterNoiseScale; float4 _SnowNoiseScale; float4 _WaterColor; float4 _Color0; float4 _UvTilling; float2 _WaterWaveNormalScale; float2 _Smoothness; float _Slope; float _Snownny; float _SnowNormalStrength; float _WaterWaveNoiseScale; float _RippleScaleA; float _RippleScaleB; float _RippleMaskStrength; float _RippleStrength; float _Rainny; #ifdef _TRANSMISSION_ASE float _TransmissionShadow; #endif #ifdef _TRANSLUCENCY_ASE float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef TESSELLATION_ON float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END sampler2D _MainTex; sampler2D _SecondTex; inline float noise_randomValue (float2 uv) { return frac(sin(dot(uv, float2(12.9898, 78.233)))*43758.5453); } inline float noise_interpolate (float a, float b, float t) { return (1.0-t)*a + (t*b); } inline float valueNoise (float2 uv) { float2 i = floor(uv); float2 f = frac( uv ); f = f* f * (3.0 - 2.0 * f); uv = abs( frac(uv) - 0.5); float2 c0 = i + float2( 0.0, 0.0 ); float2 c1 = i + float2( 1.0, 0.0 ); float2 c2 = i + float2( 0.0, 1.0 ); float2 c3 = i + float2( 1.0, 1.0 ); float r0 = noise_randomValue( c0 ); float r1 = noise_randomValue( c1 ); float r2 = noise_randomValue( c2 ); float r3 = noise_randomValue( c3 ); float bottomOfGrid = noise_interpolate( r0, r1, f.x ); float topOfGrid = noise_interpolate( r2, r3, f.x ); float t = noise_interpolate( bottomOfGrid, topOfGrid, f.y ); return t; } float SimpleNoise(float2 UV) { float t = 0.0; float freq = pow( 2.0, float( 0 ) ); float amp = pow( 0.5, float( 3 - 0 ) ); t += valueNoise( UV/freq )*amp; freq = pow(2.0, float(1)); amp = pow(0.5, float(3-1)); t += valueNoise( UV/freq )*amp; freq = pow(2.0, float(2)); amp = pow(0.5, float(3-2)); t += valueNoise( UV/freq )*amp; return t; } 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 ); float3 ase_worldNormal = TransformObjectToWorldNormal(v.ase_normal); o.ase_texcoord3.xyz = ase_worldNormal; o.ase_texcoord2.xy = v.ase_texcoord.xy; //setting value to unused interpolator channels and avoid initialization warnings o.ase_texcoord2.zw = 0; o.ase_texcoord3.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 ); 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(TESSELLATION_ON) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 ase_normal : NORMAL; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.vertex; o.ase_normal = v.ase_normal; o.ase_texcoord = v.ase_texcoord; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if 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; #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 float4 lerpResult52 = lerp( float4( 1,1,1,1 ) , _Color , _Color.a); float2 appendResult58 = (float2(_UvTilling.x , _UvTilling.y)); float2 temp_output_22_0 = ( IN.ase_texcoord2.xy * appendResult58 ); float2 appendResult59 = (float2(( WorldPosition.x * _UvTilling.z ) , ( WorldPosition.z * _UvTilling.w ))); float3 ase_worldNormal = IN.ase_texcoord3.xyz; float dotResult19 = dot( ase_worldNormal , float3(0,1,0) ); float temp_output_36_0 = saturate( ( dotResult19 * _Slope ) ); float4 lerpResult11 = lerp( ( lerpResult52 * tex2D( _MainTex, temp_output_22_0 ) ) , ( tex2D( _SecondTex, appendResult59 ) * _Color0 ) , temp_output_36_0); float2 appendResult66 = (float2(WorldPosition.x , WorldPosition.z)); float simpleNoise62 = SimpleNoise( appendResult66*_WaterNoiseScale.x ); float simpleNoise97 = SimpleNoise( appendResult66*_WaterNoiseScale.y ); float dotResult69 = dot( ase_worldNormal , float3( 0,1,0 ) ); float temp_output_70_0 = ( ( _Rainny * ( 1.0 - saturate( ( pow( ( simpleNoise62 * simpleNoise97 ) , _WaterNoiseScale.z ) * _WaterNoiseScale.w ) ) ) ) * dotResult69 ); float4 lerpResult95 = lerp( lerpResult11 , _WaterColor , temp_output_70_0); float2 appendResult129 = (float2(WorldPosition.x , WorldPosition.z)); float simpleNoise131 = SimpleNoise( appendResult129*_SnowNoiseScale.x ); float simpleNoise132 = SimpleNoise( appendResult129*_SnowNoiseScale.y ); float dotResult140 = dot( ase_worldNormal , float3( 0,1,0 ) ); float temp_output_142_0 = ( ( _Snownny * ( 1.0 - saturate( ( pow( ( simpleNoise131 * simpleNoise132 ) , _SnowNoiseScale.z ) * _SnowNoiseScale.w ) ) ) ) * dotResult140 ); float4 lerpResult146 = lerp( lerpResult95 , _SnowColor , temp_output_142_0); float3 Albedo = lerpResult146.rgb; float Alpha = 1; float AlphaClipThreshold = 0.5; half4 color = half4( Albedo, 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 _ LOD_FADE_CROSSFADE #pragma multi_compile_fog #define ASE_FOG 1 #define _NORMALMAP 1 #define ASE_SRP_VERSION 999999 #pragma prefer_hlslcc gles #pragma exclude_renderers d3d11_9x #pragma vertex vert #pragma fragment frag #define SHADERPASS_DEPTHNORMALSONLY #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/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.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 float3 worldNormal : TEXCOORD2; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) float4 _Color; float4 _SnowNormalTex_ST; float4 _WaterWaveSpeedDir; float4 _SnowColor; float4 _WaterNoiseScale; float4 _SnowNoiseScale; float4 _WaterColor; float4 _Color0; float4 _UvTilling; float2 _WaterWaveNormalScale; float2 _Smoothness; float _Slope; float _Snownny; float _SnowNormalStrength; float _WaterWaveNoiseScale; float _RippleScaleA; float _RippleScaleB; float _RippleMaskStrength; float _RippleStrength; float _Rainny; #ifdef _TRANSMISSION_ASE float _TransmissionShadow; #endif #ifdef _TRANSLUCENCY_ASE float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef TESSELLATION_ON float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END 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 ); float3 normalWS = TransformObjectToWorldNormal( v.ase_normal ); float4 positionCS = TransformWorldToHClip( positionWS ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) o.worldPos = positionWS; #endif o.worldNormal = normalWS; #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(TESSELLATION_ON) 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 { 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 _ALPHATEST_ON clip(Alpha - AlphaClipThreshold); #endif #ifdef LOD_FADE_CROSSFADE LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); #endif return float4(PackNormalOctRectEncode(TransformWorldToViewDir(IN.worldNormal, true)), 0.0, 0.0); } 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 multi_compile _ LOD_FADE_CROSSFADE #pragma multi_compile_fog #define ASE_FOG 1 #define _NORMALMAP 1 #define ASE_SRP_VERSION 999999 #pragma prefer_hlslcc gles #pragma exclude_renderers d3d11_9x #pragma multi_compile _ _MAIN_LIGHT_SHADOWS #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS #pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS #pragma multi_compile _ _SHADOWS_SOFT #pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE #pragma multi_compile _ _GBUFFER_NORMALS_OCT #pragma multi_compile _ DIRLIGHTMAP_COMBINED #pragma multi_compile _ LIGHTMAP_ON #pragma vertex vert #pragma fragment frag #define SHADERPASS SHADERPASS_GBUFFER #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.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/UnityInstancing.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/UnityGBuffer.hlsl" #if ASE_SRP_VERSION <= 70108 #define REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR #endif #if defined(UNITY_INSTANCING_ENABLED) && defined(_TERRAIN_INSTANCED_PERPIXEL_NORMAL) #define ENABLE_TERRAIN_PERPIXEL_NORMAL #endif #define ASE_NEEDS_FRAG_WORLD_POSITION #define ASE_NEEDS_FRAG_WORLD_NORMAL struct VertexInput { float4 vertex : POSITION; float3 ase_normal : NORMAL; float4 ase_tangent : TANGENT; float4 texcoord1 : TEXCOORD1; float4 texcoord : TEXCOORD0; 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 float4 ase_texcoord7 : TEXCOORD7; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) float4 _Color; float4 _SnowNormalTex_ST; float4 _WaterWaveSpeedDir; float4 _SnowColor; float4 _WaterNoiseScale; float4 _SnowNoiseScale; float4 _WaterColor; float4 _Color0; float4 _UvTilling; float2 _WaterWaveNormalScale; float2 _Smoothness; float _Slope; float _Snownny; float _SnowNormalStrength; float _WaterWaveNoiseScale; float _RippleScaleA; float _RippleScaleB; float _RippleMaskStrength; float _RippleStrength; float _Rainny; #ifdef _TRANSMISSION_ASE float _TransmissionShadow; #endif #ifdef _TRANSLUCENCY_ASE float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef TESSELLATION_ON float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END sampler2D _MainTex; sampler2D _SecondTex; inline float noise_randomValue (float2 uv) { return frac(sin(dot(uv, float2(12.9898, 78.233)))*43758.5453); } inline float noise_interpolate (float a, float b, float t) { return (1.0-t)*a + (t*b); } inline float valueNoise (float2 uv) { float2 i = floor(uv); float2 f = frac( uv ); f = f* f * (3.0 - 2.0 * f); uv = abs( frac(uv) - 0.5); float2 c0 = i + float2( 0.0, 0.0 ); float2 c1 = i + float2( 1.0, 0.0 ); float2 c2 = i + float2( 0.0, 1.0 ); float2 c3 = i + float2( 1.0, 1.0 ); float r0 = noise_randomValue( c0 ); float r1 = noise_randomValue( c1 ); float r2 = noise_randomValue( c2 ); float r3 = noise_randomValue( c3 ); float bottomOfGrid = noise_interpolate( r0, r1, f.x ); float topOfGrid = noise_interpolate( r2, r3, f.x ); float t = noise_interpolate( bottomOfGrid, topOfGrid, f.y ); return t; } float SimpleNoise(float2 UV) { float t = 0.0; float freq = pow( 2.0, float( 0 ) ); float amp = pow( 0.5, float( 3 - 0 ) ); t += valueNoise( UV/freq )*amp; freq = pow(2.0, float(1)); amp = pow(0.5, float(3-1)); t += valueNoise( UV/freq )*amp; freq = pow(2.0, float(2)); amp = pow(0.5, float(3-2)); t += valueNoise( UV/freq )*amp; return t; } 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_texcoord7.xy = v.texcoord.xy; //setting value to unused interpolator channels and avoid initialization warnings o.ase_texcoord7.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); OUTPUT_LIGHTMAP_UV( v.texcoord1, unity_LightmapST, o.lightmapUVOrVertexSH.xy ); OUTPUT_SH( normalInput.normalWS.xyz, o.lightmapUVOrVertexSH.xyz ); #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(TESSELLATION_ON) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 ase_normal : NORMAL; float4 ase_tangent : TANGENT; float4 texcoord : TEXCOORD0; float4 texcoord1 : TEXCOORD1; 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; 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; #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 FragmentOutput frag ( VertexOutput IN ) { 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 #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) ShadowCoords = IN.shadowCoord; #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); #endif WorldViewDirection = SafeNormalize( WorldViewDirection ); float4 lerpResult52 = lerp( float4( 1,1,1,1 ) , _Color , _Color.a); float2 appendResult58 = (float2(_UvTilling.x , _UvTilling.y)); float2 temp_output_22_0 = ( IN.ase_texcoord7.xy * appendResult58 ); float2 appendResult59 = (float2(( WorldPosition.x * _UvTilling.z ) , ( WorldPosition.z * _UvTilling.w ))); float dotResult19 = dot( WorldNormal , float3(0,1,0) ); float temp_output_36_0 = saturate( ( dotResult19 * _Slope ) ); float4 lerpResult11 = lerp( ( lerpResult52 * tex2D( _MainTex, temp_output_22_0 ) ) , ( tex2D( _SecondTex, appendResult59 ) * _Color0 ) , temp_output_36_0); float2 appendResult66 = (float2(WorldPosition.x , WorldPosition.z)); float simpleNoise62 = SimpleNoise( appendResult66*_WaterNoiseScale.x ); float simpleNoise97 = SimpleNoise( appendResult66*_WaterNoiseScale.y ); float dotResult69 = dot( WorldNormal , float3( 0,1,0 ) ); float temp_output_70_0 = ( ( _Rainny * ( 1.0 - saturate( ( pow( ( simpleNoise62 * simpleNoise97 ) , _WaterNoiseScale.z ) * _WaterNoiseScale.w ) ) ) ) * dotResult69 ); float4 lerpResult95 = lerp( lerpResult11 , _WaterColor , temp_output_70_0); float2 appendResult129 = (float2(WorldPosition.x , WorldPosition.z)); float simpleNoise131 = SimpleNoise( appendResult129*_SnowNoiseScale.x ); float simpleNoise132 = SimpleNoise( appendResult129*_SnowNoiseScale.y ); float dotResult140 = dot( WorldNormal , float3( 0,1,0 ) ); float temp_output_142_0 = ( ( _Snownny * ( 1.0 - saturate( ( pow( ( simpleNoise131 * simpleNoise132 ) , _SnowNoiseScale.z ) * _SnowNoiseScale.w ) ) ) ) * dotResult140 ); float4 lerpResult146 = lerp( lerpResult95 , _SnowColor , temp_output_142_0); float3 Albedo = lerpResult146.rgb; float3 Normal = float3(0, 0, 1); float3 Emission = 0; float3 Specular = 0.5; float Metallic = 0; float Smoothness = 0.5; 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 _ALPHATEST_ON clip(Alpha - AlphaClipThreshold); #endif InputData inputData; inputData.positionWS = WorldPosition; inputData.viewDirectionWS = WorldViewDirection; 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 inputData.normalWS = NormalizeNormalPerPixel(inputData.normalWS); #else inputData.normalWS = WorldNormal; #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 inputData.bakedGI = SAMPLE_GI( IN.lightmapUVOrVertexSH.xy, SH, inputData.normalWS ); #ifdef _ASE_BAKEDGI inputData.bakedGI = BakedGI; #endif BRDFData brdfData; InitializeBRDFData( Albedo, Metallic, Specular, Smoothness, Alpha, brdfData); half4 color; color.rgb = GlobalIllumination( brdfData, inputData.bakedGI, Occlusion, inputData.normalWS, inputData.viewDirectionWS); color.a = Alpha; #ifdef _TRANSMISSION_ASE { 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 += Albedo * 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 += Albedo * transmission; } #endif } #endif #ifdef _TRANSLUCENCY_ASE { 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 += Albedo * 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 += Albedo * translucency * strength; } #endif } #endif #ifdef _REFRACTION_ASE float4 projScreenPos = ScreenPos / ScreenPos.w; float3 refractionOffset = ( RefractionIndex - 1.0 ) * mul( UNITY_MATRIX_V, WorldNormal ).xyz * ( 1.0 - dot( WorldNormal, WorldViewDirection ) ); projScreenPos.xy += refractionOffset.xy; float3 refraction = SHADERGRAPH_SAMPLE_SCENE_COLOR( projScreenPos ) * 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 return BRDFDataToGbuffer(brdfData, inputData, Smoothness, Emission + color.rgb); } ENDHLSL } } /*ase_lod*/ CustomEditor "UnityEditor.ShaderGraph.PBRMasterGUI" Fallback "Hidden/InternalErrorShader" } /*ASEBEGIN Version=18800 -1913;6;1920;1013;-47.16693;-471.3331;1;True;False Node;AmplifyShaderEditor.WorldPosInputsNode;65;-1501.354,2293.262;Inherit;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 Node;AmplifyShaderEditor.DynamicAppendNode;66;-1336.354,2328.262;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.WorldPosInputsNode;128;1469.381,1373.469;Inherit;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 Node;AmplifyShaderEditor.Vector4Node;101;-1393.899,2437.915;Inherit;False;Property;_WaterNoiseScale;WaterNoiseScale;12;0;Create;True;0;0;0;False;0;False;0,0,0,0;3,3,2,10;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.NoiseGeneratorNode;62;-1181.333,2346.214;Inherit;False;Simple;True;False;2;0;FLOAT2;0,0;False;1;FLOAT;10;False;1;FLOAT;0 Node;AmplifyShaderEditor.NoiseGeneratorNode;97;-1180.899,2450.915;Inherit;False;Simple;True;False;2;0;FLOAT2;0,0;False;1;FLOAT;0.05;False;1;FLOAT;0 Node;AmplifyShaderEditor.DynamicAppendNode;129;1634.381,1408.469;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.Vector4Node;130;1576.836,1518.122;Inherit;False;Property;_SnowNoiseScale;SnowNoiseScale;25;0;Create;True;0;0;0;False;0;False;0,0,0,0;2,2,2,10;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.NoiseGeneratorNode;132;1789.836,1531.122;Inherit;False;Simple;True;False;2;0;FLOAT2;0,0;False;1;FLOAT;0.05;False;1;FLOAT;0 Node;AmplifyShaderEditor.NoiseGeneratorNode;131;1789.402,1426.421;Inherit;False;Simple;True;False;2;0;FLOAT2;0,0;False;1;FLOAT;10;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;98;-990.899,2388.915;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;133;1979.835,1469.122;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.PowerNode;99;-991.899,2479.915;Inherit;False;False;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0 Node;AmplifyShaderEditor.Vector4Node;57;-2228.718,246.8375;Inherit;False;Property;_UvTilling;UvTilling;7;0;Create;True;0;0;0;False;0;False;0,0,0,0;1,1,1,1;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.WorldPosInputsNode;53;-2244.359,416.3859;Inherit;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;100;-993.899,2573.915;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.WorldNormalVector;49;-1141.076,1042.479;Inherit;False;False;1;0;FLOAT3;0,0,1;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 Node;AmplifyShaderEditor.DynamicAppendNode;58;-1972.718,134.8375;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.SimpleMultiplyOpNode;61;-1828.922,433.6512;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;55;-1828.565,342.9829;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.TexCoordVertexDataNode;43;-2027.2,15.68698;Inherit;False;0;2;0;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.PowerNode;134;1978.835,1560.122;Inherit;False;False;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0 Node;AmplifyShaderEditor.Vector3Node;20;-1111.026,1187.641;Inherit;False;Constant;_Vector0;Vector 0;6;0;Create;True;0;0;0;False;0;False;0,1,0;0,0,0;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 Node;AmplifyShaderEditor.DynamicAppendNode;59;-1683.319,375.0374;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.DotProductOpNode;19;-887.0256,1111.641;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT;0 Node;AmplifyShaderEditor.ColorNode;50;-1002.256,-449.717;Inherit;False;Property;_Color;Color;0;0;Create;True;0;0;0;False;0;False;0,0,0,0;1,1,1,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;22;-1684.676,75.1058;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.RangedFloatNode;35;-894.978,1241.468;Inherit;False;Property;_Slope;Slope;10;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;135;1976.835,1654.122;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SaturateNode;102;-850.8989,2537.915;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.OneMinusNode;104;-850.8989,2604.915;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;127;-663.5706,2463.475;Inherit;False;Property;_Rainny;Rainny;23;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.LerpOp;52;-754.7462,-427.3546;Inherit;False;3;0;COLOR;1,1,1,1;False;1;COLOR;1,1,1,0;False;2;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.SamplerNode;9;-890,-56.5;Inherit;True;Property;_SecondTex;SecondTex;4;1;[NoScaleOffset];Create;True;0;0;0;False;0;False;-1;None;162a550843514f94cb6b91bb191b0ead;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;34;-760.657,1155.737;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.ColorNode;106;-592.7322,21.68402;Inherit;False;Property;_Color0;Color 0;5;0;Create;True;0;0;0;False;0;False;0.4899876,0.7264151,0.5653766,0;0.4899876,0.7264151,0.5653766,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SamplerNode;8;-892,-253.5;Inherit;True;Property;_MainTex;MainTex;1;1;[NoScaleOffset];Create;True;0;0;0;False;0;False;-1;None;9f0b1e34945cd194db5727a6984b6164;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.SaturateNode;136;2119.836,1618.122;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.WorldNormalVector;68;-1193.088,2674.879;Inherit;False;False;1;0;FLOAT3;0,0,1;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;51;-579.5605,-346.2751;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;105;-546.1706,-70.27458;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.RangedFloatNode;139;2346.055,1537.88;Inherit;False;Property;_Snownny;Snownny;28;0;Create;True;0;0;0;False;0;False;0;1;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.DotProductOpNode;69;-983.0872,2674.879;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,1,0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;126;-660.5706,2547.475;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.OneMinusNode;137;2119.836,1685.122;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.WorldNormalVector;138;1777.647,1755.086;Inherit;False;False;1;0;FLOAT3;0,0,1;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 Node;AmplifyShaderEditor.SaturateNode;36;-626.1965,1156.054;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;70;-487.0873,2652.879;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;141;2346.734,1614.39;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.DotProductOpNode;140;1987.647,1755.086;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,1,0;False;1;FLOAT;0 Node;AmplifyShaderEditor.ColorNode;96;97.33418,295.5858;Inherit;False;Property;_WaterColor;WaterColor;11;0;Create;True;0;0;0;False;0;False;0,0,0,0;0.319553,0.3907888,0.4056602,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.LerpOp;11;-391.2844,-110.4419;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;143;1185.556,703.3674;Inherit;False;Property;_SnowColor;SnowColor;24;0;Create;True;0;0;0;False;0;False;0.7008722,0.8192374,0.8490566,0;0.7008722,0.8192374,0.8490566,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;142;2505.648,1725.086;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.LerpOp;95;368.116,255.9925;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0.260146,0.5143791,0.6981132,0;False;2;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.SimpleAddOpNode;81;-1368.879,1618.254;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.LerpOp;39;381.0315,910.9872;Inherit;False;3;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT;0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.Vector2Node;30;-701.7025,993.2084;Inherit;False;Property;_Smoothness;Smoothness;9;0;Create;True;0;0;0;False;0;False;0,0;0.6,0.3;0;3;FLOAT2;0;FLOAT;1;FLOAT;2 Node;AmplifyShaderEditor.SamplerNode;86;-1129.306,1789.271;Inherit;True;Property;_TextureSample1;Texture Sample 1;15;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;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.Vector4Node;90;-1997.306,1796.271;Inherit;False;Property;_WaterWaveSpeedDir;WaterWaveSpeedDir;16;0;Create;True;0;0;0;False;0;False;0,0,0,0;0.1,0,0,0.1;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.DynamicAppendNode;92;-1767.306,1897.271;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.DynamicAppendNode;91;-1768.306,1801.271;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.LerpOp;147;1451.449,990.781;Inherit;False;3;0;FLOAT3;0,0,0;False;1;FLOAT3;1,1,1;False;2;FLOAT;0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.FunctionNode;125;-1059.982,2001.52;Inherit;False;New ShaderFunction 2;17;;33;135082b16eb84a8429308103a4f9231b;0;0;1;FLOAT3;0 Node;AmplifyShaderEditor.SimpleAddOpNode;89;-1366.306,1834.271;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.SamplerNode;12;-886.3245,196.502;Inherit;True;Property;_MainNormalTex;MainNormalTex;2;2;[NoScaleOffset];[Normal];Create;True;0;0;0;False;0;False;-1;None;9c955ffcf2513f743aa7f754a904088d;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;148;1463.58,1159.28;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0.5;False;2;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;144;1093.984,1076.432;Inherit;False;Property;_SnowNormalStrength;SnowNormalStrength;27;0;Create;True;0;0;0;False;0;False;0;1;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SamplerNode;15;-1132.968,846.9415;Inherit;True;Property;_SecondRoughTex;SecondRoughTex;8;1;[NoScaleOffset];Create;True;0;0;0;False;0;False;-1;None;e3e636fd30c5cc1439e71fe71f54c918;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.DynamicAppendNode;76;-1747.585,1486.698;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.LerpOp;16;-463.153,786.9232;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.Vector2Node;93;-1475.306,1966.271;Inherit;False;Property;_WaterWaveNormalScale;WaterWaveNormalScale;14;0;Create;True;0;0;0;False;0;False;0,0;0.2,0.2;0;3;FLOAT2;0;FLOAT;1;FLOAT;2 Node;AmplifyShaderEditor.WorldPosInputsNode;77;-1912.585,1451.698;Inherit;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;83;-1545.879,1742.254;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.SamplerNode;14;-1134.968,649.9416;Inherit;True;Property;_MainRoughTex;MainRoughTex;3;1;[NoScaleOffset];Create;True;0;0;0;False;0;False;-1;None;a02f57f7c35c267459f9e4219b8dfcd4;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;88;-1545.306,1871.771;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.SimpleTimeNode;80;-1806.879,1715.254;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0 Node;AmplifyShaderEditor.SamplerNode;85;-1127.168,1595.313;Inherit;True;Property;_TextureSample0;Texture Sample 0;15;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;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.SimpleMultiplyOpNode;26;-665.9057,701.2085;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.OneMinusNode;31;-826.8083,895.3201;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;78;-1613.149,1534.244;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.LerpOp;17;-402.3443,293.1107;Inherit;False;3;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT;0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.SamplerNode;145;1095.278,888.4014;Inherit;True;Property;_SnowNormalTex;SnowNormalTex;26;1;[Normal];Create;True;0;0;0;False;0;False;-1;None;b69e9e2f86bd0d345a1461e3451913e2;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;2;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.OneMinusNode;25;-821.9056,699.2085;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.TexturePropertyNode;84;-1129.168,1402.313;Inherit;True;Property;_WaterWaveNormal;WaterWaveNormal;13;1;[Normal];Create;True;0;0;0;False;0;False;None;6f2fd973651c418429b72c2c0e508036;True;bump;Auto;Texture2D;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1 Node;AmplifyShaderEditor.BlendNormalsNode;94;-803.3059,1696.271;Inherit;False;0;3;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.SaturateNode;33;-312.9955,785.4584;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SamplerNode;13;-884.3245,393.502;Inherit;True;Property;_SecondNormalTex;SecondNormalTex;6;2;[NoScaleOffset];[Normal];Create;True;0;0;0;False;0;False;-1;None;c1de607d6be97e245babda5cc01bf158;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.RangedFloatNode;75;-1843.585,1593.698;Inherit;False;Property;_WaterWaveNoiseScale;WaterWaveNoiseScale;15;0;Create;True;0;0;0;False;0;False;0;0.3;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;32;-668.8084,895.3201;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.LerpOp;146;1440.681,689.0406;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;1,1,1,1;False;2;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.LerpOp;40;381.0313,1059.537;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;1;False;2;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.BlendNormalsNode;108;-587.6927,1758.638;Inherit;False;0;3;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;7;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;2;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;GBuffer;0;7;GBuffer;5;False;False;False;False;False;False;False;False;True;0;False;-1;True;0;False;-1;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;0;0;True;1;1;False;-1;0;False;-1;1;1;False;-1;0;False;-1;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;-1;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;True;1;False;-1;True;3;False;-1;True;True;0;False;-1;0;False;-1;True;1;LightMode=UniversalGBuffer;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;4;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;2;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;True;0;False;-1;True;0;False;-1;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;0;0;False;False;False;False;False;False;False;False;False;True;2;False;-1;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;3;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;2;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;True;0;False;-1;True;0;False;-1;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;0;0;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;False;False;False;False;0;False;-1;False;False;False;False;True;1;False;-1;False;False;True;1;LightMode=DepthOnly;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;2;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;2;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;True;0;False;-1;True;0;False;-1;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;0;0;False;False;False;False;False;False;False;False;True;0;False;-1;False;False;False;False;False;False;True;1;False;-1;True;3;False;-1;False;True;1;LightMode=ShadowCaster;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;0;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;2;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;ExtraPrePass;0;0;ExtraPrePass;5;False;False;False;False;False;False;False;False;True;0;False;-1;True;0;False;-1;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;0;0;True;1;1;False;-1;0;False;-1;0;1;False;-1;0;False;-1;False;False;False;False;False;False;False;False;True;0;False;-1;True;True;True;True;True;0;False;-1;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;True;1;False;-1;True;3;False;-1;True;True;0;False;-1;0;False;-1;True;0;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;1;3182.141,735.3472;Float;False;True;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;2;ASE/Stone;94348b07e5e8bab40bd6c8a1e3df54cd;True;Forward;0;1;Forward;17;False;False;False;False;False;False;False;False;True;0;False;-1;True;0;False;-1;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;0;0;True;1;1;False;-1;0;False;-1;1;1;False;-1;0;False;-1;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;-1;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;True;1;False;-1;True;3;False;-1;True;True;0;False;-1;0;False;-1;True;1;LightMode=UniversalForward;False;0;Hidden/InternalErrorShader;0;0;Standard;36;Workflow;1;Surface;0; Refraction Model;0; Blend;0;Two Sided;1;Fragment Normal Space,InvertActionOnDeselection;0;Transmission;0; Transmission Shadow;0.5,False,-1;Translucency;0; Translucency Strength;1,False,-1; Normal Distortion;0.5,False,-1; Scattering;2,False,-1; Direct;0.9,False,-1; Ambient;0.1,False,-1; Shadow;0.5,False,-1;Cast Shadows;1; Use Shadow Threshold;0;Receive Shadows;1;GPU Instancing;1;LOD CrossFade;1;Built-in Fog;1;_FinalColorxAlpha;0;Meta Pass;1;Override Baked GI;0;Extra Pre Pass;0;DOTS Instancing;0;Tessellation;0; Phong;0; Strength;0.5,False,-1; Type;0; Tess;16,False,-1; Min;10,False,-1; Max;25,False,-1; Edge Length;16,False,-1; Max Displacement;25,False,-1;Vertex Position,InvertActionOnDeselection;1;0;8;False;True;True;True;True;True;True;True;False;;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;6;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;2;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;DepthNormals;0;6;DepthNormals;0;False;False;False;False;False;False;False;False;True;0;False;-1;True;0;False;-1;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;0;0;True;1;1;False;-1;0;False;-1;0;1;False;-1;0;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;-1;True;3;False;-1;False;True;1;LightMode=DepthNormals;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;5;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;2;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;True;0;False;-1;True;0;False;-1;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;0;0;True;1;1;False;-1;0;False;-1;1;1;False;-1;0;False;-1;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;-1;False;False;False;False;True;1;False;-1;True;3;False;-1;True;True;0;False;-1;0;False;-1;True;1;LightMode=Universal2D;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 WireConnection;66;0;65;1 WireConnection;66;1;65;3 WireConnection;62;0;66;0 WireConnection;62;1;101;1 WireConnection;97;0;66;0 WireConnection;97;1;101;2 WireConnection;129;0;128;1 WireConnection;129;1;128;3 WireConnection;132;0;129;0 WireConnection;132;1;130;2 WireConnection;131;0;129;0 WireConnection;131;1;130;1 WireConnection;98;0;62;0 WireConnection;98;1;97;0 WireConnection;133;0;131;0 WireConnection;133;1;132;0 WireConnection;99;0;98;0 WireConnection;99;1;101;3 WireConnection;100;0;99;0 WireConnection;100;1;101;4 WireConnection;58;0;57;1 WireConnection;58;1;57;2 WireConnection;61;0;53;3 WireConnection;61;1;57;4 WireConnection;55;0;53;1 WireConnection;55;1;57;3 WireConnection;134;0;133;0 WireConnection;134;1;130;3 WireConnection;59;0;55;0 WireConnection;59;1;61;0 WireConnection;19;0;49;0 WireConnection;19;1;20;0 WireConnection;22;0;43;0 WireConnection;22;1;58;0 WireConnection;135;0;134;0 WireConnection;135;1;130;4 WireConnection;102;0;100;0 WireConnection;104;0;102;0 WireConnection;52;1;50;0 WireConnection;52;2;50;4 WireConnection;9;1;59;0 WireConnection;34;0;19;0 WireConnection;34;1;35;0 WireConnection;8;1;22;0 WireConnection;136;0;135;0 WireConnection;51;0;52;0 WireConnection;51;1;8;0 WireConnection;105;0;9;0 WireConnection;105;1;106;0 WireConnection;69;0;68;0 WireConnection;126;0;127;0 WireConnection;126;1;104;0 WireConnection;137;0;136;0 WireConnection;36;0;34;0 WireConnection;70;0;126;0 WireConnection;70;1;69;0 WireConnection;141;0;139;0 WireConnection;141;1;137;0 WireConnection;140;0;138;0 WireConnection;11;0;51;0 WireConnection;11;1;105;0 WireConnection;11;2;36;0 WireConnection;142;0;141;0 WireConnection;142;1;140;0 WireConnection;95;0;11;0 WireConnection;95;1;96;0 WireConnection;95;2;70;0 WireConnection;81;0;78;0 WireConnection;81;1;83;0 WireConnection;39;0;17;0 WireConnection;39;1;108;0 WireConnection;39;2;70;0 WireConnection;86;0;84;0 WireConnection;86;1;89;0 WireConnection;86;5;93;2 WireConnection;92;0;90;3 WireConnection;92;1;90;4 WireConnection;91;0;90;1 WireConnection;91;1;90;2 WireConnection;147;0;39;0 WireConnection;147;1;145;0 WireConnection;147;2;142;0 WireConnection;89;0;78;0 WireConnection;89;1;88;0 WireConnection;12;1;22;0 WireConnection;148;0;40;0 WireConnection;148;2;142;0 WireConnection;15;1;59;0 WireConnection;76;0;77;1 WireConnection;76;1;77;3 WireConnection;16;0;26;0 WireConnection;16;1;32;0 WireConnection;16;2;36;0 WireConnection;83;0;80;0 WireConnection;83;1;91;0 WireConnection;14;1;22;0 WireConnection;88;0;80;0 WireConnection;88;1;92;0 WireConnection;85;0;84;0 WireConnection;85;1;81;0 WireConnection;85;5;93;1 WireConnection;26;0;25;0 WireConnection;26;1;30;1 WireConnection;31;0;15;1 WireConnection;78;0;76;0 WireConnection;78;1;75;0 WireConnection;17;0;12;0 WireConnection;17;1;13;0 WireConnection;17;2;36;0 WireConnection;145;5;144;0 WireConnection;25;0;14;1 WireConnection;94;0;85;0 WireConnection;94;1;86;0 WireConnection;33;0;16;0 WireConnection;13;1;59;0 WireConnection;32;0;31;0 WireConnection;32;1;30;2 WireConnection;146;0;95;0 WireConnection;146;1;143;0 WireConnection;146;2;142;0 WireConnection;40;0;33;0 WireConnection;40;2;70;0 WireConnection;108;0;94;0 WireConnection;108;1;125;0 WireConnection;1;0;146;0 WireConnection;1;1;147;0 WireConnection;1;4;148;0 ASEEND*/ //CHKSM=1335410BDA14A4AC3DB286DACC2D87131A141EEC