// Made with Amplify Shader Editor v1.9.2 // Available at the Unity Asset Store - http://u3d.as/y3X Shader "WaterShader" { Properties { [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1) [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5 [NoScaleOffset]_SkyMap("SkyMap", CUBE) = "white" {} _Refraction_Intensity("Refraction_Intensity", Float) = 1 _WaterColorA("WaterColorA", Color) = (0.1839623,0.9539894,1,0) _WaterColorB("WaterColorB", Color) = (0.1839623,0.9539894,1,0) _Color_Intensity("Color_Intensity", Float) = 1 _Emissive_Intensity("Emissive_Intensity", Float) = 1 _Alpha("Alpha", Range( 0 , 1)) = 1 _FoamColor("FoamColor", Color) = (0,0,0,0) _FoamDistance("FoamDistance", Float) = 1 _FoamMaskContrast("FoamMaskContrast", Float) = 1 _FoamMaskIntensity("FoamMaskIntensity", Float) = 1 [NoScaleOffset][Normal]_Layer01_Normal("Layer01_Normal", 2D) = "bump" {} _Layer01_Distance("Layer01_Distance", Float) = 200 _Layer01A_Normal_Intensity("Layer01A_Normal_Intensity", Float) = 1 _Layer01A_TillingOffset("Layer01A_Tilling&Offset", Vector) = (1,1,0,0) _Layer01A_X_WaterWaveSpeed("Layer01A_X_WaterWaveSpeed", Float) = 0 _Layer01A_Y_WaterWaveSpeed("Layer01A_Y_WaterWaveSpeed", Float) = 0 _Layer01B_Normal_Intensity("Layer01B_Normal_Intensity", Float) = 1 _Layer01B_TillingOffset("Layer01B_Tilling&Offset", Vector) = (1,1,0,0) _Layer01B_X_WaterWaveSpeed("Layer01B_X_WaterWaveSpeed", Float) = 0 _Layer01B_Y_WaterWaveSpeed("Layer01B_Y_WaterWaveSpeed", Float) = 0 [NoScaleOffset]_Layer02_Normal("Layer02_Normal", 2D) = "bump" {} _Layer02_Distance("Layer02_Distance", Float) = 400 _Layer02_Normal_Intensity("Layer02_Normal_Intensity", Float) = 1 _Layer02_TillingOffset("Layer02_Tilling&Offset", Vector) = (1,1,0,0) _Layer02_X_WaterWaveSpeed("Layer02_X_WaterWaveSpeed", Float) = 0 _Layer02_Y_WaterWaveSpeed("Layer02_Y_WaterWaveSpeed", Float) = 0 _Metallic("Metallic", Range( 0 , 1)) = 0 _Roghness("Roghness", Range( 0 , 1)) = 1 _MipmapBias01("MipmapBias01", Float) = 0 _MipmapBias02("MipmapBias02", Float) = 1 _MipmapBias03("MipmapBias03", Float) = 2 _DistanceBlend("DistanceBlend", Float) = 15 [Toggle(_MIPMAPBIASDEBUG_ON)] _MipmapBiasDebug("MipmapBiasDebug", Float) = 0 //_TransmissionShadow( "Transmission Shadow", Range( 0, 1 ) ) = 0.5 //_TransStrength( "Trans Strength", Range( 0, 50 ) ) = 1 //_TransNormal( "Trans Normal Distortion", Range( 0, 1 ) ) = 0.5 //_TransScattering( "Trans Scattering", Range( 1, 50 ) ) = 2 //_TransDirect( "Trans Direct", Range( 0, 1 ) ) = 0.9 //_TransAmbient( "Trans Ambient", Range( 0, 1 ) ) = 0.1 //_TransShadow( "Trans Shadow", Range( 0, 1 ) ) = 0.5 //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5 //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16 //_TessMin( "Tess Min Distance", Float ) = 10 //_TessMax( "Tess Max Distance", Float ) = 25 //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16 //_TessMaxDisp( "Tess Max Displacement", Float ) = 25 [HideInInspector][ToggleOff] _SpecularHighlights("Specular Highlights", Float) = 1.0 [HideInInspector][ToggleOff] _EnvironmentReflections("Environment Reflections", Float) = 1.0 [HideInInspector][ToggleOff] _ReceiveShadows("Receive Shadows", Float) = 1.0 [HideInInspector] _QueueOffset("_QueueOffset", Float) = 0 [HideInInspector] _QueueControl("_QueueControl", Float) = -1 [HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {} [HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {} [HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {} } SubShader { LOD 0 Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Lit" } Cull Back ZWrite Off ZTest LEqual Offset 0 , 0 AlphaToMask Off HLSLINCLUDE #pragma target 4.5 #pragma prefer_hlslcc gles #pragma only_renderers d3d11 glcore gles gles3 vulkan // ensure rendering platforms toggle list is visible #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl" #ifndef ASE_TESS_FUNCS #define ASE_TESS_FUNCS float4 FixedTess( float tessValue ) { return tessValue; } float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos ) { float3 wpos = mul(o2w,vertex).xyz; float dist = distance (wpos, cameraPos); float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess; return f; } float4 CalcTriEdgeTessFactors (float3 triVertexFactors) { float4 tess; tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z); tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z); tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y); tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f; return tess; } float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams ) { float dist = distance (0.5 * (wpos0+wpos1), cameraPos); float len = distance(wpos0, wpos1); float f = max(len * scParams.y / (edgeLen * dist), 1.0); return f; } float DistanceFromPlane (float3 pos, float4 plane) { float d = dot (float4(pos,1.0f), plane); return d; } bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] ) { float4 planeTest; planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f ); planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f ); planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f ); planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f ); return !all (planeTest); } float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos ) { float3 f; f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos); f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos); f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos); return CalcTriEdgeTessFactors (f); } float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams ) { float3 pos0 = mul(o2w,v0).xyz; float3 pos1 = mul(o2w,v1).xyz; float3 pos2 = mul(o2w,v2).xyz; float4 tess; tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); tess.w = (tess.x + tess.y + tess.z) / 3.0f; return tess; } float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] ) { float3 pos0 = mul(o2w,v0).xyz; float3 pos1 = mul(o2w,v1).xyz; float3 pos2 = mul(o2w,v2).xyz; float4 tess; if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes)) { tess = 0.0f; } else { tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); tess.w = (tess.x + tess.y + tess.z) / 3.0f; } return tess; } #endif //ASE_TESS_FUNCS ENDHLSL Pass { Name "Forward" Tags { "LightMode"="UniversalForwardOnly" } Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha ZWrite On ZTest LEqual Offset 0 , 0 ColorMask RGBA HLSLPROGRAM #define _NORMAL_DROPOFF_TS 1 #pragma multi_compile_instancing #pragma instancing_options renderinglayer #pragma multi_compile_fog #define ASE_FOG 1 #define ASE_DEPTH_WRITE_ON #define _SURFACE_TYPE_TRANSPARENT 1 #define ASE_REFRACTION 1 #define REQUIRE_OPAQUE_TEXTURE 1 #define _EMISSION #define _NORMALMAP 1 #define ASE_SRP_VERSION 140010 #define REQUIRE_DEPTH_TEXTURE 1 #pragma shader_feature_local _RECEIVE_SHADOWS_OFF #pragma shader_feature_local_fragment _SPECULARHIGHLIGHTS_OFF #pragma shader_feature_local_fragment _ENVIRONMENTREFLECTIONS_OFF #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION #pragma multi_compile_fragment _ _SHADOWS_SOFT #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 #pragma multi_compile_fragment _ _LIGHT_LAYERS #pragma multi_compile_fragment _ _LIGHT_COOKIES #pragma multi_compile _ _FORWARD_PLUS #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING #pragma multi_compile _ SHADOWS_SHADOWMASK #pragma multi_compile _ DIRLIGHTMAP_COMBINED #pragma multi_compile _ LIGHTMAP_ON #pragma multi_compile _ DYNAMICLIGHTMAP_ON #pragma multi_compile_fragment _ DEBUG_DISPLAY #pragma multi_compile_fragment _ _WRITE_RENDERING_LAYERS #pragma vertex vert #pragma fragment frag #define SHADERPASS SHADERPASS_FORWARD #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" #if defined(LOD_FADE_CROSSFADE) #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl" #endif #if defined(UNITY_INSTANCING_ENABLED) && defined(_TERRAIN_INSTANCED_PERPIXEL_NORMAL) #define ENABLE_TERRAIN_PERPIXEL_NORMAL #endif #define ASE_NEEDS_FRAG_WORLD_POSITION #define ASE_NEEDS_FRAG_WORLD_TANGENT #define ASE_NEEDS_FRAG_WORLD_NORMAL #define ASE_NEEDS_FRAG_WORLD_BITANGENT #define ASE_NEEDS_FRAG_WORLD_VIEW_DIR #define ASE_NEEDS_FRAG_SCREEN_POSITION #pragma shader_feature_local _MIPMAPBIASDEBUG_ON #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45) #define ASE_SV_DEPTH SV_DepthLessEqual #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid #else #define ASE_SV_DEPTH SV_Depth #define ASE_SV_POSITION_QUALIFIERS #endif struct VertexInput { float4 vertex : POSITION; float3 ase_normal : NORMAL; float4 ase_tangent : TANGENT; float4 texcoord : TEXCOORD0; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { ASE_SV_POSITION_QUALIFIERS float4 clipPos : SV_POSITION; float4 clipPosV : TEXCOORD0; float4 lightmapUVOrVertexSH : TEXCOORD1; half4 fogFactorAndVertexLight : TEXCOORD2; float4 tSpace0 : TEXCOORD3; float4 tSpace1 : TEXCOORD4; float4 tSpace2 : TEXCOORD5; #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) float4 shadowCoord : TEXCOORD6; #endif #if defined(DYNAMICLIGHTMAP_ON) float2 dynamicLightmapUV : TEXCOORD7; #endif float4 ase_texcoord8 : TEXCOORD8; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) half4 _Layer01A_TillingOffset; float4 _FoamColor; float4 _WaterColorB; float4 _WaterColorA; half4 _Layer01B_TillingOffset; half4 _Layer02_TillingOffset; float _Metallic; float _Emissive_Intensity; float _FoamMaskContrast; float _FoamMaskIntensity; float _FoamDistance; float _Color_Intensity; float _Refraction_Intensity; half _Layer02_Normal_Intensity; float _Layer02_Y_WaterWaveSpeed; float _Layer02_X_WaterWaveSpeed; half _Layer01B_Normal_Intensity; float _Layer01B_Y_WaterWaveSpeed; float _Layer01B_X_WaterWaveSpeed; half _Layer01A_Normal_Intensity; float _MipmapBias01; float _Layer01_Distance; float _MipmapBias02; float _DistanceBlend; float _Layer02_Distance; float _MipmapBias03; float _Layer01A_Y_WaterWaveSpeed; float _Layer01A_X_WaterWaveSpeed; float _Roghness; float _Alpha; #ifdef ASE_TRANSMISSION float _TransmissionShadow; #endif #ifdef ASE_TRANSLUCENCY float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END // Property used by ScenePickingPass #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif // Properties used by SceneSelectionPass #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif samplerCUBE _SkyMap; sampler2D _Layer01_Normal; sampler2D _Layer02_Normal; uniform float4 _CameraDepthTexture_TexelSize; //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl" //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/PBRForwardPass.hlsl" //#ifdef HAVE_VFX_MODIFICATION //#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl" //#endif VertexOutput VertexFunction( VertexInput v ) { VertexOutput o = (VertexOutput)0; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.ase_texcoord8.xyz = v.texcoord.xyz; //setting value to unused interpolator channels and avoid initialization warnings o.ase_texcoord8.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 ); float3 positionVS = TransformWorldToView( positionWS ); float4 positionCS = TransformWorldToHClip( positionWS ); VertexNormalInputs normalInput = GetVertexNormalInputs( v.ase_normal, v.ase_tangent ); o.tSpace0 = float4( normalInput.normalWS, positionWS.x); o.tSpace1 = float4( normalInput.tangentWS, positionWS.y); o.tSpace2 = float4( normalInput.bitangentWS, positionWS.z); #if defined(LIGHTMAP_ON) OUTPUT_LIGHTMAP_UV( v.texcoord1, unity_LightmapST, o.lightmapUVOrVertexSH.xy ); #endif #if !defined(LIGHTMAP_ON) OUTPUT_SH( normalInput.normalWS.xyz, o.lightmapUVOrVertexSH.xyz ); #endif #if defined(DYNAMICLIGHTMAP_ON) o.dynamicLightmapUV.xy = v.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; #endif #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) o.lightmapUVOrVertexSH.zw = v.texcoord.xy; o.lightmapUVOrVertexSH.xy = v.texcoord.xy * 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; o.clipPosV = positionCS; return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 ase_normal : NORMAL; float4 ase_tangent : TANGENT; float4 texcoord : TEXCOORD0; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.vertex; o.ase_normal = v.ase_normal; o.ase_tangent = v.ase_tangent; o.texcoord = v.texcoord; o.texcoord1 = v.texcoord1; o.texcoord2 = v.texcoord2; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [domain("tri")] [partitioning("fractional_odd")] [outputtopology("triangle_cw")] [patchconstantfunc("TessellationFunction")] [outputcontrolpoints(3)] VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) { return patch[id]; } [domain("tri")] VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { VertexInput o = (VertexInput) 0; o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; o.ase_tangent = patch[0].ase_tangent * bary.x + patch[1].ase_tangent * bary.y + patch[2].ase_tangent * bary.z; o.texcoord = patch[0].texcoord * bary.x + patch[1].texcoord * bary.y + patch[2].texcoord * bary.z; o.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z; o.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z; #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 #ifdef ASE_DEPTH_WRITE_ON ,out float outputDepth : ASE_SV_DEPTH #endif #ifdef _WRITE_RENDERING_LAYERS , out float4 outRenderingLayers : SV_Target1 #endif ) : SV_Target { UNITY_SETUP_INSTANCE_ID(IN); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN); #ifdef LOD_FADE_CROSSFADE LODFadeCrossFade( IN.clipPos ); #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 ); float4 ClipPos = IN.clipPosV; float4 ScreenPos = ComputeScreenPos( IN.clipPosV ); float2 NormalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(IN.clipPos); #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) ShadowCoords = IN.shadowCoord; #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); #endif WorldViewDirection = SafeNormalize( WorldViewDirection ); float2 texCoord97 = IN.ase_texcoord8.xyz.xy * (_Layer01A_TillingOffset).xy + (_Layer01A_TillingOffset).zw; float2 appendResult181 = (float2(_Layer01A_X_WaterWaveSpeed , _Layer01A_Y_WaterWaveSpeed)); float3 temp_output_30_0 = ( WorldPosition - _WorldSpaceCameraPos ); float temp_output_64_0 = pow( saturate( ( saturate( length( ( temp_output_30_0 / _Layer02_Distance ) ) ) * 2.0 ) ) , _DistanceBlend ); float temp_output_74_0 = saturate( temp_output_64_0 ); float lerpResult278 = lerp( 0.0 , _MipmapBias03 , temp_output_74_0); float temp_output_62_0 = pow( saturate( ( saturate( length( ( temp_output_30_0 / _Layer01_Distance ) ) ) * 2.0 ) ) , _DistanceBlend ); float temp_output_71_0 = saturate( ( temp_output_62_0 * ( 1.0 - temp_output_64_0 ) ) ); float lerpResult275 = lerp( lerpResult278 , _MipmapBias02 , temp_output_71_0); float temp_output_70_0 = saturate( ( 1.0 - temp_output_62_0 ) ); float lerpResult273 = lerp( lerpResult275 , _MipmapBias01 , temp_output_70_0); float3 unpack178 = UnpackNormalScale( tex2Dbias( _Layer01_Normal, float4( ( texCoord97 + ( appendResult181 * _TimeParameters.x ) ), 0, lerpResult273) ), _Layer01A_Normal_Intensity ); unpack178.z = lerp( 1, unpack178.z, saturate(_Layer01A_Normal_Intensity) ); float2 texCoord165 = IN.ase_texcoord8.xyz.xy * (_Layer01B_TillingOffset).xy + (_Layer01B_TillingOffset).zw; float2 appendResult187 = (float2(_Layer01B_X_WaterWaveSpeed , _Layer01B_Y_WaterWaveSpeed)); float3 unpack180 = UnpackNormalScale( tex2Dbias( _Layer01_Normal, float4( ( texCoord165 + ( appendResult187 * _TimeParameters.x ) ), 0, lerpResult273) ), _Layer01B_Normal_Intensity ); unpack180.z = lerp( 1, unpack180.z, saturate(_Layer01B_Normal_Intensity) ); float2 appendResult191 = (float2(_Layer02_X_WaterWaveSpeed , _Layer02_Y_WaterWaveSpeed)); float2 texCoord90 = IN.ase_texcoord8.xyz.xy * (_Layer02_TillingOffset).xy + (_Layer02_TillingOffset).zw; float2 panner95 = ( 1.0 * _Time.y * appendResult191 + texCoord90); float3 unpack84 = UnpackNormalScale( tex2Dbias( _Layer02_Normal, float4( panner95, 0, lerpResult273) ), _Layer02_Normal_Intensity ); unpack84.z = lerp( 1, unpack84.z, saturate(_Layer02_Normal_Intensity) ); float3 temp_output_86_0 = BlendNormal( BlendNormal( unpack178 , unpack180 ) , unpack84 ); float3 tanToWorld0 = float3( WorldTangent.x, WorldBiTangent.x, WorldNormal.x ); float3 tanToWorld1 = float3( WorldTangent.y, WorldBiTangent.y, WorldNormal.y ); float3 tanToWorld2 = float3( WorldTangent.z, WorldBiTangent.z, WorldNormal.z ); float3 worldRefl78 = reflect( -WorldViewDirection, float3( dot( tanToWorld0, temp_output_86_0 ), dot( tanToWorld1, temp_output_86_0 ), dot( tanToWorld2, temp_output_86_0 ) ) ); float fresnelNdotV134 = dot( WorldNormal, WorldViewDirection ); float fresnelNode134 = ( 0.0 + 1.0 * pow( 1.0 - fresnelNdotV134, 5.0 ) ); float3 lerpResult113 = lerp( (_WaterColorA).rgb , (_WaterColorB).rgb , fresnelNode134); float4 ase_screenPosNorm = ScreenPos / ScreenPos.w; ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; float screenDepth11 = LinearEyeDepth(SHADERGRAPH_SAMPLE_SCENE_DEPTH( ase_screenPosNorm.xy ),_ZBufferParams); float distanceDepth11 = abs( ( screenDepth11 - LinearEyeDepth( ase_screenPosNorm.z,_ZBufferParams ) ) / ( _FoamDistance ) ); float temp_output_156_0 = saturate( pow( saturate( ( saturate( distanceDepth11 ) * _FoamMaskIntensity ) ) , _FoamMaskContrast ) ); float4 color289 = IsGammaSpace() ? float4(0,0,1,0) : float4(0,0,1,0); float4 lerpResult286 = lerp( float4( 0,0,0,0 ) , color289 , temp_output_74_0); float4 color288 = IsGammaSpace() ? float4(0,1,0,0) : float4(0,1,0,0); float4 lerpResult287 = lerp( lerpResult286 , color288 , temp_output_71_0); float4 color283 = IsGammaSpace() ? float4(1,0,0,0) : float4(1,0,0,0); float4 lerpResult285 = lerp( lerpResult287 , color283 , temp_output_70_0); #ifdef _MIPMAPBIASDEBUG_ON float3 staticSwitch284 = (lerpResult285).rgb; #else float3 staticSwitch284 = ( ( (texCUBE( _SkyMap, worldRefl78 )).rgb * _Refraction_Intensity ) + ( lerpResult113 * _Color_Intensity ) + ( (_FoamColor).rgb * ( 1.0 - temp_output_156_0 ) ) ); #endif float temp_output_15_0 = ( temp_output_156_0 * _Alpha ); float3 BaseColor = staticSwitch284; float3 Normal = temp_output_86_0; float3 Emission = ( staticSwitch284 * _Emissive_Intensity ); float3 Specular = 0.5; float Metallic = _Metallic; float Smoothness = _Roghness; float Occlusion = 1; float Alpha = temp_output_15_0; float AlphaClipThreshold = 0.5; float AlphaClipThresholdShadow = 0.5; float3 BakedGI = 0; float3 RefractionColor = 1; float RefractionIndex = ( ( (temp_output_86_0).y * ( 1.0 - fresnelNode134 ) * temp_output_15_0 ) + 1.0 ); float3 Transmission = 1; float3 Translucency = 1; #ifdef ASE_DEPTH_WRITE_ON float DepthValue = IN.clipPos.z; #endif #ifdef _CLEARCOAT float CoatMask = 0; float CoatSmoothness = 0; #endif #ifdef _ALPHATEST_ON clip(Alpha - AlphaClipThreshold); #endif InputData inputData = (InputData)0; inputData.positionWS = WorldPosition; inputData.viewDirectionWS = WorldViewDirection; #ifdef _NORMALMAP #if _NORMAL_DROPOFF_TS inputData.normalWS = TransformTangentToWorld(Normal, half3x3(WorldTangent, WorldBiTangent, WorldNormal)); #elif _NORMAL_DROPOFF_OS inputData.normalWS = TransformObjectToWorldNormal(Normal); #elif _NORMAL_DROPOFF_WS inputData.normalWS = Normal; #endif inputData.normalWS = NormalizeNormalPerPixel(inputData.normalWS); #else inputData.normalWS = WorldNormal; #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) inputData.shadowCoord = ShadowCoords; #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) inputData.shadowCoord = TransformWorldToShadowCoord(inputData.positionWS); #else inputData.shadowCoord = float4(0, 0, 0, 0); #endif #ifdef ASE_FOG inputData.fogCoord = IN.fogFactorAndVertexLight.x; #endif inputData.vertexLighting = IN.fogFactorAndVertexLight.yzw; #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) float3 SH = SampleSH(inputData.normalWS.xyz); #else float3 SH = IN.lightmapUVOrVertexSH.xyz; #endif #if defined(DYNAMICLIGHTMAP_ON) inputData.bakedGI = SAMPLE_GI(IN.lightmapUVOrVertexSH.xy, IN.dynamicLightmapUV.xy, SH, inputData.normalWS); #else inputData.bakedGI = SAMPLE_GI(IN.lightmapUVOrVertexSH.xy, SH, inputData.normalWS); #endif #ifdef ASE_BAKEDGI inputData.bakedGI = BakedGI; #endif inputData.normalizedScreenSpaceUV = NormalizedScreenSpaceUV; inputData.shadowMask = SAMPLE_SHADOWMASK(IN.lightmapUVOrVertexSH.xy); #if defined(DEBUG_DISPLAY) #if defined(DYNAMICLIGHTMAP_ON) inputData.dynamicLightmapUV = IN.dynamicLightmapUV.xy; #endif #if defined(LIGHTMAP_ON) inputData.staticLightmapUV = IN.lightmapUVOrVertexSH.xy; #else inputData.vertexSH = SH; #endif #endif SurfaceData surfaceData; surfaceData.albedo = BaseColor; surfaceData.metallic = saturate(Metallic); surfaceData.specular = Specular; surfaceData.smoothness = saturate(Smoothness), surfaceData.occlusion = Occlusion, surfaceData.emission = Emission, surfaceData.alpha = saturate(Alpha); surfaceData.normalTS = Normal; surfaceData.clearCoatMask = 0; surfaceData.clearCoatSmoothness = 1; #ifdef _CLEARCOAT surfaceData.clearCoatMask = saturate(CoatMask); surfaceData.clearCoatSmoothness = saturate(CoatSmoothness); #endif #ifdef _DBUFFER ApplyDecalToSurfaceData(IN.clipPos, surfaceData, inputData); #endif half4 color = UniversalFragmentPBR( inputData, surfaceData); #ifdef ASE_TRANSMISSION { float shadow = _TransmissionShadow; #define SUM_LIGHT_TRANSMISSION(Light)\ float3 atten = Light.color * Light.distanceAttenuation;\ atten = lerp( atten, atten * Light.shadowAttenuation, shadow );\ half3 transmission = max( 0, -dot( inputData.normalWS, Light.direction ) ) * atten * Transmission;\ color.rgb += BaseColor * transmission; SUM_LIGHT_TRANSMISSION( GetMainLight( inputData.shadowCoord ) ); #if defined(_ADDITIONAL_LIGHTS) uint meshRenderingLayers = GetMeshRenderingLayer(); uint pixelLightCount = GetAdditionalLightsCount(); #if USE_FORWARD_PLUS for (uint lightIndex = 0; lightIndex < min(URP_FP_DIRECTIONAL_LIGHTS_COUNT, MAX_VISIBLE_LIGHTS); lightIndex++) { FORWARD_PLUS_SUBTRACTIVE_LIGHT_CHECK Light light = GetAdditionalLight(lightIndex, inputData.positionWS); #ifdef _LIGHT_LAYERS if (IsMatchingLightLayer(light.layerMask, meshRenderingLayers)) #endif { SUM_LIGHT_TRANSMISSION( light ); } } #endif LIGHT_LOOP_BEGIN( pixelLightCount ) Light light = GetAdditionalLight(lightIndex, inputData.positionWS); #ifdef _LIGHT_LAYERS if (IsMatchingLightLayer(light.layerMask, meshRenderingLayers)) #endif { SUM_LIGHT_TRANSMISSION( light ); } LIGHT_LOOP_END #endif } #endif #ifdef ASE_TRANSLUCENCY { float shadow = _TransShadow; float normal = _TransNormal; float scattering = _TransScattering; float direct = _TransDirect; float ambient = _TransAmbient; float strength = _TransStrength; #define SUM_LIGHT_TRANSLUCENCY(Light)\ float3 atten = Light.color * Light.distanceAttenuation;\ atten = lerp( atten, atten * Light.shadowAttenuation, shadow );\ half3 lightDir = Light.direction + inputData.normalWS * normal;\ half VdotL = pow( saturate( dot( inputData.viewDirectionWS, -lightDir ) ), scattering );\ half3 translucency = atten * ( VdotL * direct + inputData.bakedGI * ambient ) * Translucency;\ color.rgb += BaseColor * translucency * strength; SUM_LIGHT_TRANSLUCENCY( GetMainLight( inputData.shadowCoord ) ); #if defined(_ADDITIONAL_LIGHTS) uint meshRenderingLayers = GetMeshRenderingLayer(); uint pixelLightCount = GetAdditionalLightsCount(); #if USE_FORWARD_PLUS for (uint lightIndex = 0; lightIndex < min(URP_FP_DIRECTIONAL_LIGHTS_COUNT, MAX_VISIBLE_LIGHTS); lightIndex++) { FORWARD_PLUS_SUBTRACTIVE_LIGHT_CHECK Light light = GetAdditionalLight(lightIndex, inputData.positionWS); #ifdef _LIGHT_LAYERS if (IsMatchingLightLayer(light.layerMask, meshRenderingLayers)) #endif { SUM_LIGHT_TRANSLUCENCY( light ); } } #endif LIGHT_LOOP_BEGIN( pixelLightCount ) Light light = GetAdditionalLight(lightIndex, inputData.positionWS); #ifdef _LIGHT_LAYERS if (IsMatchingLightLayer(light.layerMask, meshRenderingLayers)) #endif { SUM_LIGHT_TRANSLUCENCY( light ); } LIGHT_LOOP_END #endif } #endif #ifdef ASE_REFRACTION float4 projScreenPos = ScreenPos / ScreenPos.w; float3 refractionOffset = ( RefractionIndex - 1.0 ) * mul( UNITY_MATRIX_V, float4( WorldNormal,0 ) ).xyz * ( 1.0 - dot( WorldNormal, WorldViewDirection ) ); projScreenPos.xy += refractionOffset.xy; float3 refraction = SHADERGRAPH_SAMPLE_SCENE_COLOR( projScreenPos.xy ) * RefractionColor; color.rgb = lerp( refraction, color.rgb, color.a ); color.a = 1; #endif #ifdef ASE_FINAL_COLOR_ALPHA_MULTIPLY color.rgb *= color.a; #endif #ifdef ASE_FOG #ifdef TERRAIN_SPLAT_ADDPASS color.rgb = MixFogColor(color.rgb, half3( 0, 0, 0 ), IN.fogFactorAndVertexLight.x ); #else color.rgb = MixFog(color.rgb, IN.fogFactorAndVertexLight.x); #endif #endif #ifdef ASE_DEPTH_WRITE_ON outputDepth = DepthValue; #endif #ifdef _WRITE_RENDERING_LAYERS uint renderingLayers = GetMeshRenderingLayer(); outRenderingLayers = float4( EncodeMeshRenderingLayer( renderingLayers ), 0, 0, 0 ); #endif return color; } ENDHLSL } Pass { Name "ShadowCaster" Tags { "LightMode"="ShadowCaster" } ZWrite On ZTest LEqual AlphaToMask Off ColorMask 0 HLSLPROGRAM #define _NORMAL_DROPOFF_TS 1 #pragma multi_compile_instancing #define ASE_FOG 1 #define ASE_DEPTH_WRITE_ON #define _SURFACE_TYPE_TRANSPARENT 1 #define ASE_REFRACTION 1 #define REQUIRE_OPAQUE_TEXTURE 1 #define _EMISSION #define _NORMALMAP 1 #define ASE_SRP_VERSION 140010 #define REQUIRE_DEPTH_TEXTURE 1 #pragma vertex vert #pragma fragment frag #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW #define SHADERPASS SHADERPASS_SHADOWCASTER #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" #if defined(LOD_FADE_CROSSFADE) #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl" #endif #define ASE_NEEDS_FRAG_SCREEN_POSITION #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45) #define ASE_SV_DEPTH SV_DepthLessEqual #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid #else #define ASE_SV_DEPTH SV_Depth #define ASE_SV_POSITION_QUALIFIERS #endif struct VertexInput { float4 vertex : POSITION; float3 ase_normal : NORMAL; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { ASE_SV_POSITION_QUALIFIERS float4 clipPos : SV_POSITION; float4 clipPosV : TEXCOORD0; #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 worldPos : TEXCOORD1; #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) float4 shadowCoord : TEXCOORD2; #endif UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) half4 _Layer01A_TillingOffset; float4 _FoamColor; float4 _WaterColorB; float4 _WaterColorA; half4 _Layer01B_TillingOffset; half4 _Layer02_TillingOffset; float _Metallic; float _Emissive_Intensity; float _FoamMaskContrast; float _FoamMaskIntensity; float _FoamDistance; float _Color_Intensity; float _Refraction_Intensity; half _Layer02_Normal_Intensity; float _Layer02_Y_WaterWaveSpeed; float _Layer02_X_WaterWaveSpeed; half _Layer01B_Normal_Intensity; float _Layer01B_Y_WaterWaveSpeed; float _Layer01B_X_WaterWaveSpeed; half _Layer01A_Normal_Intensity; float _MipmapBias01; float _Layer01_Distance; float _MipmapBias02; float _DistanceBlend; float _Layer02_Distance; float _MipmapBias03; float _Layer01A_Y_WaterWaveSpeed; float _Layer01A_X_WaterWaveSpeed; float _Roghness; float _Alpha; #ifdef ASE_TRANSMISSION float _TransmissionShadow; #endif #ifdef ASE_TRANSLUCENCY float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END // Property used by ScenePickingPass #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif // Properties used by SceneSelectionPass #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif uniform float4 _CameraDepthTexture_TexelSize; //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl" //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShadowCasterPass.hlsl" //#ifdef HAVE_VFX_MODIFICATION //#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl" //#endif float3 _LightDirection; float3 _LightPosition; VertexOutput VertexFunction( VertexInput v ) { VertexOutput o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o ); #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.vertex.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.vertex.xyz = vertexValue; #else v.vertex.xyz += vertexValue; #endif v.ase_normal = v.ase_normal; float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) o.worldPos = positionWS; #endif float3 normalWS = TransformObjectToWorldDir(v.ase_normal); #if _CASTING_PUNCTUAL_LIGHT_SHADOW float3 lightDirectionWS = normalize(_LightPosition - positionWS); #else float3 lightDirectionWS = _LightDirection; #endif float4 clipPos = TransformWorldToHClip(ApplyShadowBias(positionWS, normalWS, lightDirectionWS)); #if UNITY_REVERSED_Z clipPos.z = min(clipPos.z, UNITY_NEAR_CLIP_VALUE); #else clipPos.z = max(clipPos.z, UNITY_NEAR_CLIP_VALUE); #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) VertexPositionInputs vertexInput = (VertexPositionInputs)0; vertexInput.positionWS = positionWS; vertexInput.positionCS = clipPos; o.shadowCoord = GetShadowCoord( vertexInput ); #endif o.clipPos = clipPos; o.clipPosV = clipPos; return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 ase_normal : NORMAL; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.vertex; o.ase_normal = v.ase_normal; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [domain("tri")] [partitioning("fractional_odd")] [outputtopology("triangle_cw")] [patchconstantfunc("TessellationFunction")] [outputcontrolpoints(3)] VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) { return patch[id]; } [domain("tri")] VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { VertexInput o = (VertexInput) 0; o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); float phongStrength = _TessPhongStrength; o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else VertexOutput vert ( VertexInput v ) { return VertexFunction( v ); } #endif half4 frag( VertexOutput IN #ifdef ASE_DEPTH_WRITE_ON ,out float outputDepth : ASE_SV_DEPTH #endif ) : SV_TARGET { UNITY_SETUP_INSTANCE_ID( IN ); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 WorldPosition = IN.worldPos; #endif float4 ShadowCoords = float4( 0, 0, 0, 0 ); float4 ClipPos = IN.clipPosV; float4 ScreenPos = ComputeScreenPos( IN.clipPosV ); #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 ase_screenPosNorm = ScreenPos / ScreenPos.w; ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; float screenDepth11 = LinearEyeDepth(SHADERGRAPH_SAMPLE_SCENE_DEPTH( ase_screenPosNorm.xy ),_ZBufferParams); float distanceDepth11 = abs( ( screenDepth11 - LinearEyeDepth( ase_screenPosNorm.z,_ZBufferParams ) ) / ( _FoamDistance ) ); float temp_output_156_0 = saturate( pow( saturate( ( saturate( distanceDepth11 ) * _FoamMaskIntensity ) ) , _FoamMaskContrast ) ); float temp_output_15_0 = ( temp_output_156_0 * _Alpha ); float Alpha = temp_output_15_0; float AlphaClipThreshold = 0.5; float AlphaClipThresholdShadow = 0.5; #ifdef ASE_DEPTH_WRITE_ON float DepthValue = IN.clipPos.z; #endif #ifdef _ALPHATEST_ON #ifdef _ALPHATEST_SHADOW_ON clip(Alpha - AlphaClipThresholdShadow); #else clip(Alpha - AlphaClipThreshold); #endif #endif #ifdef LOD_FADE_CROSSFADE LODFadeCrossFade( IN.clipPos ); #endif #ifdef ASE_DEPTH_WRITE_ON outputDepth = DepthValue; #endif return 0; } ENDHLSL } Pass { Name "DepthOnly" Tags { "LightMode"="DepthOnly" } ZWrite On ColorMask R AlphaToMask Off HLSLPROGRAM #define _NORMAL_DROPOFF_TS 1 #pragma multi_compile_instancing #define ASE_FOG 1 #define ASE_DEPTH_WRITE_ON #define _SURFACE_TYPE_TRANSPARENT 1 #define ASE_REFRACTION 1 #define REQUIRE_OPAQUE_TEXTURE 1 #define _EMISSION #define _NORMALMAP 1 #define ASE_SRP_VERSION 140010 #define REQUIRE_DEPTH_TEXTURE 1 #pragma vertex vert #pragma fragment frag #define SHADERPASS SHADERPASS_DEPTHONLY #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" #if defined(LOD_FADE_CROSSFADE) #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl" #endif #define ASE_NEEDS_FRAG_SCREEN_POSITION #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45) #define ASE_SV_DEPTH SV_DepthLessEqual #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid #else #define ASE_SV_DEPTH SV_Depth #define ASE_SV_POSITION_QUALIFIERS #endif struct VertexInput { float4 vertex : POSITION; float3 ase_normal : NORMAL; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { ASE_SV_POSITION_QUALIFIERS float4 clipPos : SV_POSITION; float4 clipPosV : TEXCOORD0; #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 worldPos : TEXCOORD1; #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) float4 shadowCoord : TEXCOORD2; #endif UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) half4 _Layer01A_TillingOffset; float4 _FoamColor; float4 _WaterColorB; float4 _WaterColorA; half4 _Layer01B_TillingOffset; half4 _Layer02_TillingOffset; float _Metallic; float _Emissive_Intensity; float _FoamMaskContrast; float _FoamMaskIntensity; float _FoamDistance; float _Color_Intensity; float _Refraction_Intensity; half _Layer02_Normal_Intensity; float _Layer02_Y_WaterWaveSpeed; float _Layer02_X_WaterWaveSpeed; half _Layer01B_Normal_Intensity; float _Layer01B_Y_WaterWaveSpeed; float _Layer01B_X_WaterWaveSpeed; half _Layer01A_Normal_Intensity; float _MipmapBias01; float _Layer01_Distance; float _MipmapBias02; float _DistanceBlend; float _Layer02_Distance; float _MipmapBias03; float _Layer01A_Y_WaterWaveSpeed; float _Layer01A_X_WaterWaveSpeed; float _Roghness; float _Alpha; #ifdef ASE_TRANSMISSION float _TransmissionShadow; #endif #ifdef ASE_TRANSLUCENCY float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END // Property used by ScenePickingPass #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif // Properties used by SceneSelectionPass #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif uniform float4 _CameraDepthTexture_TexelSize; //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl" //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/DepthOnlyPass.hlsl" //#ifdef HAVE_VFX_MODIFICATION //#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl" //#endif VertexOutput VertexFunction( VertexInput v ) { VertexOutput o = (VertexOutput)0; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.vertex.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.vertex.xyz = vertexValue; #else v.vertex.xyz += vertexValue; #endif v.ase_normal = v.ase_normal; float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); float4 positionCS = TransformWorldToHClip( positionWS ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) o.worldPos = positionWS; #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) VertexPositionInputs vertexInput = (VertexPositionInputs)0; vertexInput.positionWS = positionWS; vertexInput.positionCS = positionCS; o.shadowCoord = GetShadowCoord( vertexInput ); #endif o.clipPos = positionCS; o.clipPosV = positionCS; return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 ase_normal : NORMAL; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.vertex; o.ase_normal = v.ase_normal; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [domain("tri")] [partitioning("fractional_odd")] [outputtopology("triangle_cw")] [patchconstantfunc("TessellationFunction")] [outputcontrolpoints(3)] VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) { return patch[id]; } [domain("tri")] VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { VertexInput o = (VertexInput) 0; o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); float phongStrength = _TessPhongStrength; o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else VertexOutput vert ( VertexInput v ) { return VertexFunction( v ); } #endif half4 frag( VertexOutput IN #ifdef ASE_DEPTH_WRITE_ON ,out float outputDepth : ASE_SV_DEPTH #endif ) : SV_TARGET { UNITY_SETUP_INSTANCE_ID(IN); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 WorldPosition = IN.worldPos; #endif float4 ShadowCoords = float4( 0, 0, 0, 0 ); float4 ClipPos = IN.clipPosV; float4 ScreenPos = ComputeScreenPos( IN.clipPosV ); #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 ase_screenPosNorm = ScreenPos / ScreenPos.w; ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; float screenDepth11 = LinearEyeDepth(SHADERGRAPH_SAMPLE_SCENE_DEPTH( ase_screenPosNorm.xy ),_ZBufferParams); float distanceDepth11 = abs( ( screenDepth11 - LinearEyeDepth( ase_screenPosNorm.z,_ZBufferParams ) ) / ( _FoamDistance ) ); float temp_output_156_0 = saturate( pow( saturate( ( saturate( distanceDepth11 ) * _FoamMaskIntensity ) ) , _FoamMaskContrast ) ); float temp_output_15_0 = ( temp_output_156_0 * _Alpha ); float Alpha = temp_output_15_0; float AlphaClipThreshold = 0.5; #ifdef ASE_DEPTH_WRITE_ON float DepthValue = IN.clipPos.z; #endif #ifdef _ALPHATEST_ON clip(Alpha - AlphaClipThreshold); #endif #ifdef LOD_FADE_CROSSFADE LODFadeCrossFade( IN.clipPos ); #endif #ifdef ASE_DEPTH_WRITE_ON outputDepth = DepthValue; #endif return 0; } ENDHLSL } Pass { Name "Meta" Tags { "LightMode"="Meta" } Cull Off HLSLPROGRAM #define _NORMAL_DROPOFF_TS 1 #define ASE_FOG 1 #define ASE_DEPTH_WRITE_ON #define _SURFACE_TYPE_TRANSPARENT 1 #define ASE_REFRACTION 1 #define REQUIRE_OPAQUE_TEXTURE 1 #define _EMISSION #define _NORMALMAP 1 #define ASE_SRP_VERSION 140010 #define REQUIRE_DEPTH_TEXTURE 1 #pragma vertex vert #pragma fragment frag #pragma shader_feature EDITOR_VISUALIZATION #define SHADERPASS SHADERPASS_META #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/MetaInput.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" #define ASE_NEEDS_FRAG_WORLD_POSITION #define ASE_NEEDS_VERT_NORMAL #pragma shader_feature_local _MIPMAPBIASDEBUG_ON struct VertexInput { float4 vertex : POSITION; float3 ase_normal : NORMAL; float4 texcoord0 : TEXCOORD0; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; float4 ase_tangent : TANGENT; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float4 clipPos : SV_POSITION; #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 worldPos : TEXCOORD0; #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) float4 shadowCoord : TEXCOORD1; #endif #ifdef EDITOR_VISUALIZATION float4 VizUV : TEXCOORD2; float4 LightCoord : TEXCOORD3; #endif float4 ase_texcoord4 : TEXCOORD4; float4 ase_texcoord5 : TEXCOORD5; float4 ase_texcoord6 : TEXCOORD6; float4 ase_texcoord7 : TEXCOORD7; float4 ase_texcoord8 : TEXCOORD8; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) half4 _Layer01A_TillingOffset; float4 _FoamColor; float4 _WaterColorB; float4 _WaterColorA; half4 _Layer01B_TillingOffset; half4 _Layer02_TillingOffset; float _Metallic; float _Emissive_Intensity; float _FoamMaskContrast; float _FoamMaskIntensity; float _FoamDistance; float _Color_Intensity; float _Refraction_Intensity; half _Layer02_Normal_Intensity; float _Layer02_Y_WaterWaveSpeed; float _Layer02_X_WaterWaveSpeed; half _Layer01B_Normal_Intensity; float _Layer01B_Y_WaterWaveSpeed; float _Layer01B_X_WaterWaveSpeed; half _Layer01A_Normal_Intensity; float _MipmapBias01; float _Layer01_Distance; float _MipmapBias02; float _DistanceBlend; float _Layer02_Distance; float _MipmapBias03; float _Layer01A_Y_WaterWaveSpeed; float _Layer01A_X_WaterWaveSpeed; float _Roghness; float _Alpha; #ifdef ASE_TRANSMISSION float _TransmissionShadow; #endif #ifdef ASE_TRANSLUCENCY float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END // Property used by ScenePickingPass #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif // Properties used by SceneSelectionPass #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif samplerCUBE _SkyMap; sampler2D _Layer01_Normal; sampler2D _Layer02_Normal; uniform float4 _CameraDepthTexture_TexelSize; //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl" //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/LightingMetaPass.hlsl" //#ifdef HAVE_VFX_MODIFICATION //#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl" //#endif VertexOutput VertexFunction( VertexInput v ) { VertexOutput o = (VertexOutput)0; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); float3 ase_worldTangent = TransformObjectToWorldDir(v.ase_tangent.xyz); o.ase_texcoord5.xyz = ase_worldTangent; float3 ase_worldNormal = TransformObjectToWorldNormal(v.ase_normal); o.ase_texcoord6.xyz = ase_worldNormal; float ase_vertexTangentSign = v.ase_tangent.w * ( unity_WorldTransformParams.w >= 0.0 ? 1.0 : -1.0 ); float3 ase_worldBitangent = cross( ase_worldNormal, ase_worldTangent ) * ase_vertexTangentSign; o.ase_texcoord7.xyz = ase_worldBitangent; float4 ase_clipPos = TransformObjectToHClip((v.vertex).xyz); float4 screenPos = ComputeScreenPos(ase_clipPos); o.ase_texcoord8 = screenPos; o.ase_texcoord4.xyz = v.texcoord0.xyz; //setting value to unused interpolator channels and avoid initialization warnings o.ase_texcoord4.w = 0; o.ase_texcoord5.w = 0; o.ase_texcoord6.w = 0; o.ase_texcoord7.w = 0; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.vertex.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.vertex.xyz = vertexValue; #else v.vertex.xyz += vertexValue; #endif v.ase_normal = v.ase_normal; float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) o.worldPos = positionWS; #endif o.clipPos = MetaVertexPosition( v.vertex, v.texcoord1.xy, v.texcoord1.xy, unity_LightmapST, unity_DynamicLightmapST ); #ifdef EDITOR_VISUALIZATION float2 VizUV = 0; float4 LightCoord = 0; UnityEditorVizData(v.vertex.xyz, v.texcoord0.xy, v.texcoord1.xy, v.texcoord2.xy, VizUV, LightCoord); o.VizUV = float4(VizUV, 0, 0); o.LightCoord = LightCoord; #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) VertexPositionInputs vertexInput = (VertexPositionInputs)0; vertexInput.positionWS = positionWS; vertexInput.positionCS = o.clipPos; o.shadowCoord = GetShadowCoord( vertexInput ); #endif return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 ase_normal : NORMAL; float4 texcoord0 : TEXCOORD0; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; float4 ase_tangent : TANGENT; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.vertex; o.ase_normal = v.ase_normal; o.texcoord0 = v.texcoord0; o.texcoord1 = v.texcoord1; o.texcoord2 = v.texcoord2; o.ase_tangent = v.ase_tangent; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [domain("tri")] [partitioning("fractional_odd")] [outputtopology("triangle_cw")] [patchconstantfunc("TessellationFunction")] [outputcontrolpoints(3)] VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) { return patch[id]; } [domain("tri")] VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { VertexInput o = (VertexInput) 0; o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; o.texcoord0 = patch[0].texcoord0 * bary.x + patch[1].texcoord0 * bary.y + patch[2].texcoord0 * bary.z; o.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z; o.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z; o.ase_tangent = patch[0].ase_tangent * bary.x + patch[1].ase_tangent * bary.y + patch[2].ase_tangent * 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 float2 texCoord97 = IN.ase_texcoord4.xyz.xy * (_Layer01A_TillingOffset).xy + (_Layer01A_TillingOffset).zw; float2 appendResult181 = (float2(_Layer01A_X_WaterWaveSpeed , _Layer01A_Y_WaterWaveSpeed)); float3 temp_output_30_0 = ( WorldPosition - _WorldSpaceCameraPos ); float temp_output_64_0 = pow( saturate( ( saturate( length( ( temp_output_30_0 / _Layer02_Distance ) ) ) * 2.0 ) ) , _DistanceBlend ); float temp_output_74_0 = saturate( temp_output_64_0 ); float lerpResult278 = lerp( 0.0 , _MipmapBias03 , temp_output_74_0); float temp_output_62_0 = pow( saturate( ( saturate( length( ( temp_output_30_0 / _Layer01_Distance ) ) ) * 2.0 ) ) , _DistanceBlend ); float temp_output_71_0 = saturate( ( temp_output_62_0 * ( 1.0 - temp_output_64_0 ) ) ); float lerpResult275 = lerp( lerpResult278 , _MipmapBias02 , temp_output_71_0); float temp_output_70_0 = saturate( ( 1.0 - temp_output_62_0 ) ); float lerpResult273 = lerp( lerpResult275 , _MipmapBias01 , temp_output_70_0); float3 unpack178 = UnpackNormalScale( tex2Dbias( _Layer01_Normal, float4( ( texCoord97 + ( appendResult181 * _TimeParameters.x ) ), 0, lerpResult273) ), _Layer01A_Normal_Intensity ); unpack178.z = lerp( 1, unpack178.z, saturate(_Layer01A_Normal_Intensity) ); float2 texCoord165 = IN.ase_texcoord4.xyz.xy * (_Layer01B_TillingOffset).xy + (_Layer01B_TillingOffset).zw; float2 appendResult187 = (float2(_Layer01B_X_WaterWaveSpeed , _Layer01B_Y_WaterWaveSpeed)); float3 unpack180 = UnpackNormalScale( tex2Dbias( _Layer01_Normal, float4( ( texCoord165 + ( appendResult187 * _TimeParameters.x ) ), 0, lerpResult273) ), _Layer01B_Normal_Intensity ); unpack180.z = lerp( 1, unpack180.z, saturate(_Layer01B_Normal_Intensity) ); float2 appendResult191 = (float2(_Layer02_X_WaterWaveSpeed , _Layer02_Y_WaterWaveSpeed)); float2 texCoord90 = IN.ase_texcoord4.xyz.xy * (_Layer02_TillingOffset).xy + (_Layer02_TillingOffset).zw; float2 panner95 = ( 1.0 * _Time.y * appendResult191 + texCoord90); float3 unpack84 = UnpackNormalScale( tex2Dbias( _Layer02_Normal, float4( panner95, 0, lerpResult273) ), _Layer02_Normal_Intensity ); unpack84.z = lerp( 1, unpack84.z, saturate(_Layer02_Normal_Intensity) ); float3 temp_output_86_0 = BlendNormal( BlendNormal( unpack178 , unpack180 ) , unpack84 ); float3 ase_worldTangent = IN.ase_texcoord5.xyz; float3 ase_worldNormal = IN.ase_texcoord6.xyz; float3 ase_worldBitangent = IN.ase_texcoord7.xyz; float3 tanToWorld0 = float3( ase_worldTangent.x, ase_worldBitangent.x, ase_worldNormal.x ); float3 tanToWorld1 = float3( ase_worldTangent.y, ase_worldBitangent.y, ase_worldNormal.y ); float3 tanToWorld2 = float3( ase_worldTangent.z, ase_worldBitangent.z, ase_worldNormal.z ); float3 ase_worldViewDir = ( _WorldSpaceCameraPos.xyz - WorldPosition ); ase_worldViewDir = normalize(ase_worldViewDir); float3 worldRefl78 = reflect( -ase_worldViewDir, float3( dot( tanToWorld0, temp_output_86_0 ), dot( tanToWorld1, temp_output_86_0 ), dot( tanToWorld2, temp_output_86_0 ) ) ); float fresnelNdotV134 = dot( ase_worldNormal, ase_worldViewDir ); float fresnelNode134 = ( 0.0 + 1.0 * pow( 1.0 - fresnelNdotV134, 5.0 ) ); float3 lerpResult113 = lerp( (_WaterColorA).rgb , (_WaterColorB).rgb , fresnelNode134); float4 screenPos = IN.ase_texcoord8; float4 ase_screenPosNorm = screenPos / screenPos.w; ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; float screenDepth11 = LinearEyeDepth(SHADERGRAPH_SAMPLE_SCENE_DEPTH( ase_screenPosNorm.xy ),_ZBufferParams); float distanceDepth11 = abs( ( screenDepth11 - LinearEyeDepth( ase_screenPosNorm.z,_ZBufferParams ) ) / ( _FoamDistance ) ); float temp_output_156_0 = saturate( pow( saturate( ( saturate( distanceDepth11 ) * _FoamMaskIntensity ) ) , _FoamMaskContrast ) ); float4 color289 = IsGammaSpace() ? float4(0,0,1,0) : float4(0,0,1,0); float4 lerpResult286 = lerp( float4( 0,0,0,0 ) , color289 , temp_output_74_0); float4 color288 = IsGammaSpace() ? float4(0,1,0,0) : float4(0,1,0,0); float4 lerpResult287 = lerp( lerpResult286 , color288 , temp_output_71_0); float4 color283 = IsGammaSpace() ? float4(1,0,0,0) : float4(1,0,0,0); float4 lerpResult285 = lerp( lerpResult287 , color283 , temp_output_70_0); #ifdef _MIPMAPBIASDEBUG_ON float3 staticSwitch284 = (lerpResult285).rgb; #else float3 staticSwitch284 = ( ( (texCUBE( _SkyMap, worldRefl78 )).rgb * _Refraction_Intensity ) + ( lerpResult113 * _Color_Intensity ) + ( (_FoamColor).rgb * ( 1.0 - temp_output_156_0 ) ) ); #endif float temp_output_15_0 = ( temp_output_156_0 * _Alpha ); float3 BaseColor = staticSwitch284; float3 Emission = ( staticSwitch284 * _Emissive_Intensity ); float Alpha = temp_output_15_0; float AlphaClipThreshold = 0.5; #ifdef _ALPHATEST_ON clip(Alpha - AlphaClipThreshold); #endif MetaInput metaInput = (MetaInput)0; metaInput.Albedo = BaseColor; metaInput.Emission = Emission; #ifdef EDITOR_VISUALIZATION metaInput.VizUV = IN.VizUV.xy; metaInput.LightCoord = IN.LightCoord; #endif return UnityMetaFragment(metaInput); } ENDHLSL } Pass { Name "DepthNormals" Tags { "LightMode"="DepthNormalsOnly" } ZWrite On Blend One Zero ZTest LEqual ZWrite On HLSLPROGRAM #define _NORMAL_DROPOFF_TS 1 #pragma multi_compile_instancing #define ASE_FOG 1 #define ASE_DEPTH_WRITE_ON #define _SURFACE_TYPE_TRANSPARENT 1 #define ASE_REFRACTION 1 #define REQUIRE_OPAQUE_TEXTURE 1 #define _EMISSION #define _NORMALMAP 1 #define ASE_SRP_VERSION 140010 #define REQUIRE_DEPTH_TEXTURE 1 #pragma vertex vert #pragma fragment frag #pragma multi_compile_fragment _ _WRITE_RENDERING_LAYERS #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" #if defined(LOD_FADE_CROSSFADE) #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl" #endif #define ASE_NEEDS_FRAG_WORLD_POSITION #define ASE_NEEDS_FRAG_SCREEN_POSITION #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45) #define ASE_SV_DEPTH SV_DepthLessEqual #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid #else #define ASE_SV_DEPTH SV_Depth #define ASE_SV_POSITION_QUALIFIERS #endif struct VertexInput { float4 vertex : POSITION; float3 ase_normal : NORMAL; float4 ase_tangent : TANGENT; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { ASE_SV_POSITION_QUALIFIERS float4 clipPos : SV_POSITION; float4 clipPosV : TEXCOORD0; float3 worldNormal : TEXCOORD1; float4 worldTangent : TEXCOORD2; #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 worldPos : TEXCOORD3; #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) float4 shadowCoord : TEXCOORD4; #endif float4 ase_texcoord5 : TEXCOORD5; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) half4 _Layer01A_TillingOffset; float4 _FoamColor; float4 _WaterColorB; float4 _WaterColorA; half4 _Layer01B_TillingOffset; half4 _Layer02_TillingOffset; float _Metallic; float _Emissive_Intensity; float _FoamMaskContrast; float _FoamMaskIntensity; float _FoamDistance; float _Color_Intensity; float _Refraction_Intensity; half _Layer02_Normal_Intensity; float _Layer02_Y_WaterWaveSpeed; float _Layer02_X_WaterWaveSpeed; half _Layer01B_Normal_Intensity; float _Layer01B_Y_WaterWaveSpeed; float _Layer01B_X_WaterWaveSpeed; half _Layer01A_Normal_Intensity; float _MipmapBias01; float _Layer01_Distance; float _MipmapBias02; float _DistanceBlend; float _Layer02_Distance; float _MipmapBias03; float _Layer01A_Y_WaterWaveSpeed; float _Layer01A_X_WaterWaveSpeed; float _Roghness; float _Alpha; #ifdef ASE_TRANSMISSION float _TransmissionShadow; #endif #ifdef ASE_TRANSLUCENCY float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END // Property used by ScenePickingPass #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif // Properties used by SceneSelectionPass #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif sampler2D _Layer01_Normal; sampler2D _Layer02_Normal; uniform float4 _CameraDepthTexture_TexelSize; //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl" //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/DepthNormalsOnlyPass.hlsl" //#ifdef HAVE_VFX_MODIFICATION //#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/VisualEffectVertex.hlsl" //#endif VertexOutput VertexFunction( VertexInput v ) { VertexOutput o = (VertexOutput)0; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.ase_texcoord5.xy = v.ase_texcoord.xy; //setting value to unused interpolator channels and avoid initialization warnings o.ase_texcoord5.zw = 0; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.vertex.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.vertex.xyz = vertexValue; #else v.vertex.xyz += vertexValue; #endif v.ase_normal = v.ase_normal; float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); float3 normalWS = TransformObjectToWorldNormal( v.ase_normal ); float4 tangentWS = float4(TransformObjectToWorldDir( v.ase_tangent.xyz), v.ase_tangent.w); float4 positionCS = TransformWorldToHClip( positionWS ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) o.worldPos = positionWS; #endif o.worldNormal = normalWS; o.worldTangent = tangentWS; #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) VertexPositionInputs vertexInput = (VertexPositionInputs)0; vertexInput.positionWS = positionWS; vertexInput.positionCS = positionCS; o.shadowCoord = GetShadowCoord( vertexInput ); #endif o.clipPos = positionCS; o.clipPosV = positionCS; return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 ase_normal : NORMAL; float4 ase_tangent : TANGENT; 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_tangent = v.ase_tangent; 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_tangent = patch[0].ase_tangent * bary.x + patch[1].ase_tangent * bary.y + patch[2].ase_tangent * bary.z; o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; #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 void frag( VertexOutput IN , out half4 outNormalWS : SV_Target0 #ifdef ASE_DEPTH_WRITE_ON ,out float outputDepth : ASE_SV_DEPTH #endif #ifdef _WRITE_RENDERING_LAYERS , out float4 outRenderingLayers : SV_Target1 #endif ) { UNITY_SETUP_INSTANCE_ID(IN); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 WorldPosition = IN.worldPos; #endif float4 ShadowCoords = float4( 0, 0, 0, 0 ); float3 WorldNormal = IN.worldNormal; float4 WorldTangent = IN.worldTangent; float4 ClipPos = IN.clipPosV; float4 ScreenPos = ComputeScreenPos( IN.clipPosV ); #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 float2 texCoord97 = IN.ase_texcoord5.xy * (_Layer01A_TillingOffset).xy + (_Layer01A_TillingOffset).zw; float2 appendResult181 = (float2(_Layer01A_X_WaterWaveSpeed , _Layer01A_Y_WaterWaveSpeed)); float3 temp_output_30_0 = ( WorldPosition - _WorldSpaceCameraPos ); float temp_output_64_0 = pow( saturate( ( saturate( length( ( temp_output_30_0 / _Layer02_Distance ) ) ) * 2.0 ) ) , _DistanceBlend ); float temp_output_74_0 = saturate( temp_output_64_0 ); float lerpResult278 = lerp( 0.0 , _MipmapBias03 , temp_output_74_0); float temp_output_62_0 = pow( saturate( ( saturate( length( ( temp_output_30_0 / _Layer01_Distance ) ) ) * 2.0 ) ) , _DistanceBlend ); float temp_output_71_0 = saturate( ( temp_output_62_0 * ( 1.0 - temp_output_64_0 ) ) ); float lerpResult275 = lerp( lerpResult278 , _MipmapBias02 , temp_output_71_0); float temp_output_70_0 = saturate( ( 1.0 - temp_output_62_0 ) ); float lerpResult273 = lerp( lerpResult275 , _MipmapBias01 , temp_output_70_0); float3 unpack178 = UnpackNormalScale( tex2Dbias( _Layer01_Normal, float4( ( texCoord97 + ( appendResult181 * _TimeParameters.x ) ), 0, lerpResult273) ), _Layer01A_Normal_Intensity ); unpack178.z = lerp( 1, unpack178.z, saturate(_Layer01A_Normal_Intensity) ); float2 texCoord165 = IN.ase_texcoord5.xy * (_Layer01B_TillingOffset).xy + (_Layer01B_TillingOffset).zw; float2 appendResult187 = (float2(_Layer01B_X_WaterWaveSpeed , _Layer01B_Y_WaterWaveSpeed)); float3 unpack180 = UnpackNormalScale( tex2Dbias( _Layer01_Normal, float4( ( texCoord165 + ( appendResult187 * _TimeParameters.x ) ), 0, lerpResult273) ), _Layer01B_Normal_Intensity ); unpack180.z = lerp( 1, unpack180.z, saturate(_Layer01B_Normal_Intensity) ); float2 appendResult191 = (float2(_Layer02_X_WaterWaveSpeed , _Layer02_Y_WaterWaveSpeed)); float2 texCoord90 = IN.ase_texcoord5.xy * (_Layer02_TillingOffset).xy + (_Layer02_TillingOffset).zw; float2 panner95 = ( 1.0 * _Time.y * appendResult191 + texCoord90); float3 unpack84 = UnpackNormalScale( tex2Dbias( _Layer02_Normal, float4( panner95, 0, lerpResult273) ), _Layer02_Normal_Intensity ); unpack84.z = lerp( 1, unpack84.z, saturate(_Layer02_Normal_Intensity) ); float3 temp_output_86_0 = BlendNormal( BlendNormal( unpack178 , unpack180 ) , unpack84 ); float4 ase_screenPosNorm = ScreenPos / ScreenPos.w; ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; float screenDepth11 = LinearEyeDepth(SHADERGRAPH_SAMPLE_SCENE_DEPTH( ase_screenPosNorm.xy ),_ZBufferParams); float distanceDepth11 = abs( ( screenDepth11 - LinearEyeDepth( ase_screenPosNorm.z,_ZBufferParams ) ) / ( _FoamDistance ) ); float temp_output_156_0 = saturate( pow( saturate( ( saturate( distanceDepth11 ) * _FoamMaskIntensity ) ) , _FoamMaskContrast ) ); float temp_output_15_0 = ( temp_output_156_0 * _Alpha ); float3 Normal = temp_output_86_0; float Alpha = temp_output_15_0; float AlphaClipThreshold = 0.5; #ifdef ASE_DEPTH_WRITE_ON float DepthValue = IN.clipPos.z; #endif #ifdef _ALPHATEST_ON clip(Alpha - AlphaClipThreshold); #endif #ifdef LOD_FADE_CROSSFADE LODFadeCrossFade( IN.clipPos ); #endif #ifdef ASE_DEPTH_WRITE_ON outputDepth = DepthValue; #endif #if defined(_GBUFFER_NORMALS_OCT) float2 octNormalWS = PackNormalOctQuadEncode(WorldNormal); float2 remappedOctNormalWS = saturate(octNormalWS * 0.5 + 0.5); half3 packedNormalWS = PackFloat2To888(remappedOctNormalWS); outNormalWS = half4(packedNormalWS, 0.0); #else #if defined(_NORMALMAP) #if _NORMAL_DROPOFF_TS float crossSign = (WorldTangent.w > 0.0 ? 1.0 : -1.0) * GetOddNegativeScale(); float3 bitangent = crossSign * cross(WorldNormal.xyz, WorldTangent.xyz); float3 normalWS = TransformTangentToWorld(Normal, half3x3(WorldTangent.xyz, bitangent, WorldNormal.xyz)); #elif _NORMAL_DROPOFF_OS float3 normalWS = TransformObjectToWorldNormal(Normal); #elif _NORMAL_DROPOFF_WS float3 normalWS = Normal; #endif #else float3 normalWS = WorldNormal; #endif outNormalWS = half4(NormalizeNormalPerPixel(normalWS), 0.0); #endif #ifdef _WRITE_RENDERING_LAYERS uint renderingLayers = GetMeshRenderingLayer(); outRenderingLayers = float4( EncodeMeshRenderingLayer( renderingLayers ), 0, 0, 0 ); #endif } ENDHLSL } Pass { Name "GBuffer" Tags { "LightMode"="UniversalGBuffer" } Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha ZWrite On ZTest LEqual Offset 0 , 0 ColorMask RGBA HLSLPROGRAM #define _NORMAL_DROPOFF_TS 1 #pragma multi_compile_instancing #pragma instancing_options renderinglayer #pragma multi_compile_fog #define ASE_FOG 1 #define ASE_DEPTH_WRITE_ON #define _SURFACE_TYPE_TRANSPARENT 1 #define ASE_REFRACTION 1 #define REQUIRE_OPAQUE_TEXTURE 1 #define _EMISSION #define _NORMALMAP 1 #define ASE_SRP_VERSION 140010 #define REQUIRE_DEPTH_TEXTURE 1 #pragma shader_feature_local _RECEIVE_SHADOWS_OFF #pragma shader_feature_local_fragment _SPECULARHIGHLIGHTS_OFF #pragma shader_feature_local_fragment _ENVIRONMENTREFLECTIONS_OFF #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION #pragma multi_compile_fragment _ _SHADOWS_SOFT #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 #pragma multi_compile_fragment _ _RENDER_PASS_ENABLED #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING #pragma multi_compile _ SHADOWS_SHADOWMASK #pragma multi_compile _ DIRLIGHTMAP_COMBINED #pragma multi_compile _ LIGHTMAP_ON #pragma multi_compile _ DYNAMICLIGHTMAP_ON #pragma multi_compile_fragment _ _GBUFFER_NORMALS_OCT #pragma multi_compile_fragment _ _WRITE_RENDERING_LAYERS #pragma vertex vert #pragma fragment frag #define SHADERPASS SHADERPASS_GBUFFER #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" #if defined(LOD_FADE_CROSSFADE) #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl" #endif #if defined(UNITY_INSTANCING_ENABLED) && defined(_TERRAIN_INSTANCED_PERPIXEL_NORMAL) #define ENABLE_TERRAIN_PERPIXEL_NORMAL #endif #define ASE_NEEDS_FRAG_WORLD_POSITION #define ASE_NEEDS_FRAG_WORLD_TANGENT #define ASE_NEEDS_FRAG_WORLD_NORMAL #define ASE_NEEDS_FRAG_WORLD_BITANGENT #define ASE_NEEDS_FRAG_WORLD_VIEW_DIR #define ASE_NEEDS_FRAG_SCREEN_POSITION #pragma shader_feature_local _MIPMAPBIASDEBUG_ON #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45) #define ASE_SV_DEPTH SV_DepthLessEqual #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid #else #define ASE_SV_DEPTH SV_Depth #define ASE_SV_POSITION_QUALIFIERS #endif struct VertexInput { float4 vertex : POSITION; float3 ase_normal : NORMAL; float4 ase_tangent : TANGENT; float4 texcoord : TEXCOORD0; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { ASE_SV_POSITION_QUALIFIERS float4 clipPos : SV_POSITION; float4 clipPosV : TEXCOORD0; float4 lightmapUVOrVertexSH : TEXCOORD1; half4 fogFactorAndVertexLight : TEXCOORD2; float4 tSpace0 : TEXCOORD3; float4 tSpace1 : TEXCOORD4; float4 tSpace2 : TEXCOORD5; #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) float4 shadowCoord : TEXCOORD6; #endif #if defined(DYNAMICLIGHTMAP_ON) float2 dynamicLightmapUV : TEXCOORD7; #endif float4 ase_texcoord8 : TEXCOORD8; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) half4 _Layer01A_TillingOffset; float4 _FoamColor; float4 _WaterColorB; float4 _WaterColorA; half4 _Layer01B_TillingOffset; half4 _Layer02_TillingOffset; float _Metallic; float _Emissive_Intensity; float _FoamMaskContrast; float _FoamMaskIntensity; float _FoamDistance; float _Color_Intensity; float _Refraction_Intensity; half _Layer02_Normal_Intensity; float _Layer02_Y_WaterWaveSpeed; float _Layer02_X_WaterWaveSpeed; half _Layer01B_Normal_Intensity; float _Layer01B_Y_WaterWaveSpeed; float _Layer01B_X_WaterWaveSpeed; half _Layer01A_Normal_Intensity; float _MipmapBias01; float _Layer01_Distance; float _MipmapBias02; float _DistanceBlend; float _Layer02_Distance; float _MipmapBias03; float _Layer01A_Y_WaterWaveSpeed; float _Layer01A_X_WaterWaveSpeed; float _Roghness; float _Alpha; #ifdef ASE_TRANSMISSION float _TransmissionShadow; #endif #ifdef ASE_TRANSLUCENCY float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END // Property used by ScenePickingPass #ifdef SCENEPICKINGPASS float4 _SelectionID; #endif // Properties used by SceneSelectionPass #ifdef SCENESELECTIONPASS int _ObjectId; int _PassValue; #endif samplerCUBE _SkyMap; sampler2D _Layer01_Normal; sampler2D _Layer02_Normal; uniform float4 _CameraDepthTexture_TexelSize; //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/UnityGBuffer.hlsl" //#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/PBRGBufferPass.hlsl" VertexOutput VertexFunction( VertexInput v ) { VertexOutput o = (VertexOutput)0; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.ase_texcoord8.xyz = v.texcoord.xyz; //setting value to unused interpolator channels and avoid initialization warnings o.ase_texcoord8.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 ); float3 positionVS = TransformWorldToView( positionWS ); float4 positionCS = TransformWorldToHClip( positionWS ); VertexNormalInputs normalInput = GetVertexNormalInputs( v.ase_normal, v.ase_tangent ); o.tSpace0 = float4( normalInput.normalWS, positionWS.x); o.tSpace1 = float4( normalInput.tangentWS, positionWS.y); o.tSpace2 = float4( normalInput.bitangentWS, positionWS.z); #if defined(LIGHTMAP_ON) OUTPUT_LIGHTMAP_UV(v.texcoord1, unity_LightmapST, o.lightmapUVOrVertexSH.xy); #endif #if defined(DYNAMICLIGHTMAP_ON) o.dynamicLightmapUV.xy = v.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; #endif #if !defined(LIGHTMAP_ON) OUTPUT_SH(normalInput.normalWS.xyz, o.lightmapUVOrVertexSH.xyz); #endif #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) o.lightmapUVOrVertexSH.zw = v.texcoord.xy; o.lightmapUVOrVertexSH.xy = v.texcoord.xy * unity_LightmapST.xy + unity_LightmapST.zw; #endif half3 vertexLight = VertexLighting( positionWS, normalInput.normalWS ); o.fogFactorAndVertexLight = half4(0, vertexLight); #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) VertexPositionInputs vertexInput = (VertexPositionInputs)0; vertexInput.positionWS = positionWS; vertexInput.positionCS = positionCS; o.shadowCoord = GetShadowCoord( vertexInput ); #endif o.clipPos = positionCS; o.clipPosV = positionCS; return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 ase_normal : NORMAL; float4 ase_tangent : TANGENT; float4 texcoord : TEXCOORD0; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.vertex; o.ase_normal = v.ase_normal; o.ase_tangent = v.ase_tangent; o.texcoord = v.texcoord; o.texcoord1 = v.texcoord1; o.texcoord2 = v.texcoord2; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if defined(ASE_FIXED_TESSELLATION) tf = FixedTess( tessValue ); #elif defined(ASE_DISTANCE_TESSELLATION) tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [domain("tri")] [partitioning("fractional_odd")] [outputtopology("triangle_cw")] [patchconstantfunc("TessellationFunction")] [outputcontrolpoints(3)] VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) { return patch[id]; } [domain("tri")] VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { VertexInput o = (VertexInput) 0; o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; o.ase_tangent = patch[0].ase_tangent * bary.x + patch[1].ase_tangent * bary.y + patch[2].ase_tangent * bary.z; o.texcoord = patch[0].texcoord * bary.x + patch[1].texcoord * bary.y + patch[2].texcoord * bary.z; o.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z; o.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z; #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 #ifdef ASE_DEPTH_WRITE_ON ,out float outputDepth : ASE_SV_DEPTH #endif ) { UNITY_SETUP_INSTANCE_ID(IN); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN); #ifdef LOD_FADE_CROSSFADE LODFadeCrossFade( IN.clipPos ); #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 ); float4 ClipPos = IN.clipPosV; float4 ScreenPos = ComputeScreenPos( IN.clipPosV ); float2 NormalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(IN.clipPos); #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) ShadowCoords = IN.shadowCoord; #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); #else ShadowCoords = float4(0, 0, 0, 0); #endif WorldViewDirection = SafeNormalize( WorldViewDirection ); float2 texCoord97 = IN.ase_texcoord8.xyz.xy * (_Layer01A_TillingOffset).xy + (_Layer01A_TillingOffset).zw; float2 appendResult181 = (float2(_Layer01A_X_WaterWaveSpeed , _Layer01A_Y_WaterWaveSpeed)); float3 temp_output_30_0 = ( WorldPosition - _WorldSpaceCameraPos ); float temp_output_64_0 = pow( saturate( ( saturate( length( ( temp_output_30_0 / _Layer02_Distance ) ) ) * 2.0 ) ) , _DistanceBlend ); float temp_output_74_0 = saturate( temp_output_64_0 ); float lerpResult278 = lerp( 0.0 , _MipmapBias03 , temp_output_74_0); float temp_output_62_0 = pow( saturate( ( saturate( length( ( temp_output_30_0 / _Layer01_Distance ) ) ) * 2.0 ) ) , _DistanceBlend ); float temp_output_71_0 = saturate( ( temp_output_62_0 * ( 1.0 - temp_output_64_0 ) ) ); float lerpResult275 = lerp( lerpResult278 , _MipmapBias02 , temp_output_71_0); float temp_output_70_0 = saturate( ( 1.0 - temp_output_62_0 ) ); float lerpResult273 = lerp( lerpResult275 , _MipmapBias01 , temp_output_70_0); float3 unpack178 = UnpackNormalScale( tex2Dbias( _Layer01_Normal, float4( ( texCoord97 + ( appendResult181 * _TimeParameters.x ) ), 0, lerpResult273) ), _Layer01A_Normal_Intensity ); unpack178.z = lerp( 1, unpack178.z, saturate(_Layer01A_Normal_Intensity) ); float2 texCoord165 = IN.ase_texcoord8.xyz.xy * (_Layer01B_TillingOffset).xy + (_Layer01B_TillingOffset).zw; float2 appendResult187 = (float2(_Layer01B_X_WaterWaveSpeed , _Layer01B_Y_WaterWaveSpeed)); float3 unpack180 = UnpackNormalScale( tex2Dbias( _Layer01_Normal, float4( ( texCoord165 + ( appendResult187 * _TimeParameters.x ) ), 0, lerpResult273) ), _Layer01B_Normal_Intensity ); unpack180.z = lerp( 1, unpack180.z, saturate(_Layer01B_Normal_Intensity) ); float2 appendResult191 = (float2(_Layer02_X_WaterWaveSpeed , _Layer02_Y_WaterWaveSpeed)); float2 texCoord90 = IN.ase_texcoord8.xyz.xy * (_Layer02_TillingOffset).xy + (_Layer02_TillingOffset).zw; float2 panner95 = ( 1.0 * _Time.y * appendResult191 + texCoord90); float3 unpack84 = UnpackNormalScale( tex2Dbias( _Layer02_Normal, float4( panner95, 0, lerpResult273) ), _Layer02_Normal_Intensity ); unpack84.z = lerp( 1, unpack84.z, saturate(_Layer02_Normal_Intensity) ); float3 temp_output_86_0 = BlendNormal( BlendNormal( unpack178 , unpack180 ) , unpack84 ); float3 tanToWorld0 = float3( WorldTangent.x, WorldBiTangent.x, WorldNormal.x ); float3 tanToWorld1 = float3( WorldTangent.y, WorldBiTangent.y, WorldNormal.y ); float3 tanToWorld2 = float3( WorldTangent.z, WorldBiTangent.z, WorldNormal.z ); float3 worldRefl78 = reflect( -WorldViewDirection, float3( dot( tanToWorld0, temp_output_86_0 ), dot( tanToWorld1, temp_output_86_0 ), dot( tanToWorld2, temp_output_86_0 ) ) ); float fresnelNdotV134 = dot( WorldNormal, WorldViewDirection ); float fresnelNode134 = ( 0.0 + 1.0 * pow( 1.0 - fresnelNdotV134, 5.0 ) ); float3 lerpResult113 = lerp( (_WaterColorA).rgb , (_WaterColorB).rgb , fresnelNode134); float4 ase_screenPosNorm = ScreenPos / ScreenPos.w; ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; float screenDepth11 = LinearEyeDepth(SHADERGRAPH_SAMPLE_SCENE_DEPTH( ase_screenPosNorm.xy ),_ZBufferParams); float distanceDepth11 = abs( ( screenDepth11 - LinearEyeDepth( ase_screenPosNorm.z,_ZBufferParams ) ) / ( _FoamDistance ) ); float temp_output_156_0 = saturate( pow( saturate( ( saturate( distanceDepth11 ) * _FoamMaskIntensity ) ) , _FoamMaskContrast ) ); float4 color289 = IsGammaSpace() ? float4(0,0,1,0) : float4(0,0,1,0); float4 lerpResult286 = lerp( float4( 0,0,0,0 ) , color289 , temp_output_74_0); float4 color288 = IsGammaSpace() ? float4(0,1,0,0) : float4(0,1,0,0); float4 lerpResult287 = lerp( lerpResult286 , color288 , temp_output_71_0); float4 color283 = IsGammaSpace() ? float4(1,0,0,0) : float4(1,0,0,0); float4 lerpResult285 = lerp( lerpResult287 , color283 , temp_output_70_0); #ifdef _MIPMAPBIASDEBUG_ON float3 staticSwitch284 = (lerpResult285).rgb; #else float3 staticSwitch284 = ( ( (texCUBE( _SkyMap, worldRefl78 )).rgb * _Refraction_Intensity ) + ( lerpResult113 * _Color_Intensity ) + ( (_FoamColor).rgb * ( 1.0 - temp_output_156_0 ) ) ); #endif float temp_output_15_0 = ( temp_output_156_0 * _Alpha ); float3 BaseColor = staticSwitch284; float3 Normal = temp_output_86_0; float3 Emission = ( staticSwitch284 * _Emissive_Intensity ); float3 Specular = 0.5; float Metallic = _Metallic; float Smoothness = _Roghness; float Occlusion = 1; float Alpha = temp_output_15_0; float AlphaClipThreshold = 0.5; float AlphaClipThresholdShadow = 0.5; float3 BakedGI = 0; float3 RefractionColor = 1; float RefractionIndex = ( ( (temp_output_86_0).y * ( 1.0 - fresnelNode134 ) * temp_output_15_0 ) + 1.0 ); float3 Transmission = 1; float3 Translucency = 1; #ifdef ASE_DEPTH_WRITE_ON float DepthValue = IN.clipPos.z; #endif #ifdef _ALPHATEST_ON clip(Alpha - AlphaClipThreshold); #endif InputData inputData = (InputData)0; inputData.positionWS = WorldPosition; inputData.positionCS = IN.clipPos; inputData.shadowCoord = ShadowCoords; #ifdef _NORMALMAP #if _NORMAL_DROPOFF_TS inputData.normalWS = TransformTangentToWorld(Normal, half3x3( WorldTangent, WorldBiTangent, WorldNormal )); #elif _NORMAL_DROPOFF_OS inputData.normalWS = TransformObjectToWorldNormal(Normal); #elif _NORMAL_DROPOFF_WS inputData.normalWS = Normal; #endif #else inputData.normalWS = WorldNormal; #endif inputData.normalWS = NormalizeNormalPerPixel(inputData.normalWS); inputData.viewDirectionWS = SafeNormalize( WorldViewDirection ); inputData.vertexLighting = IN.fogFactorAndVertexLight.yzw; #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) float3 SH = SampleSH(inputData.normalWS.xyz); #else float3 SH = IN.lightmapUVOrVertexSH.xyz; #endif #ifdef ASE_BAKEDGI inputData.bakedGI = BakedGI; #else #if defined(DYNAMICLIGHTMAP_ON) inputData.bakedGI = SAMPLE_GI( IN.lightmapUVOrVertexSH.xy, IN.dynamicLightmapUV.xy, SH, inputData.normalWS); #else inputData.bakedGI = SAMPLE_GI( IN.lightmapUVOrVertexSH.xy, SH, inputData.normalWS ); #endif #endif inputData.normalizedScreenSpaceUV = NormalizedScreenSpaceUV; inputData.shadowMask = SAMPLE_SHADOWMASK(IN.lightmapUVOrVertexSH.xy); #if defined(DEBUG_DISPLAY) #if defined(DYNAMICLIGHTMAP_ON) inputData.dynamicLightmapUV = IN.dynamicLightmapUV.xy; #endif #if defined(LIGHTMAP_ON) inputData.staticLightmapUV = IN.lightmapUVOrVertexSH.xy; #else inputData.vertexSH = SH; #endif #endif #ifdef _DBUFFER ApplyDecal(IN.clipPos, BaseColor, Specular, inputData.normalWS, Metallic, Occlusion, Smoothness); #endif BRDFData brdfData; InitializeBRDFData (BaseColor, Metallic, Specular, Smoothness, Alpha, brdfData); Light mainLight = GetMainLight(inputData.shadowCoord, inputData.positionWS, inputData.shadowMask); half4 color; MixRealtimeAndBakedGI(mainLight, inputData.normalWS, inputData.bakedGI, inputData.shadowMask); color.rgb = GlobalIllumination(brdfData, inputData.bakedGI, Occlusion, inputData.positionWS, inputData.normalWS, inputData.viewDirectionWS); color.a = Alpha; #ifdef ASE_FINAL_COLOR_ALPHA_MULTIPLY color.rgb *= color.a; #endif #ifdef ASE_DEPTH_WRITE_ON outputDepth = DepthValue; #endif return BRDFDataToGbuffer(brdfData, inputData, Smoothness, Emission + color.rgb, Occlusion); } ENDHLSL } } CustomEditor "UnityEditor.ShaderGraphLitGUI" FallBack "Hidden/Shader Graph/FallbackError" Fallback Off } /*ASEBEGIN Version=19200 Node;AmplifyShaderEditor.CommentaryNode;81;1403.162,-1433.927;Inherit;False;592.8756;248;采样环境反射;2;80;78;;1,1,1,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;77;-705.4972,-271.8919;Inherit;False;228;163;LowQuality;1;74;;0,0,1,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;76;-700.6945,-469.6978;Inherit;False;228;163;MiddleQuality;1;71;;0,1,0,1;0;0 Node;AmplifyShaderEditor.CommentaryNode;75;-706.1987,-655.5342;Inherit;False;228;163;HeighQuality;1;70;;1,0,0,1;0;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;90;62.99365,-1187.976;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.PannerNode;95;295.1936,-1187.776;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 Node;AmplifyShaderEditor.Vector4Node;103;-489.1782,-1175.501;Half;False;Property;_Layer02_TillingOffset;Layer02_Tilling&Offset;24;0;Create;True;0;0;0;False;0;False;1,1,0,0;0,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.ComponentMaskNode;106;-189.3199,-1193.473;Inherit;False;True;True;False;False;1;0;FLOAT4;0,0,0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.ComponentMaskNode;107;-187.0737,-1121.597;Inherit;False;False;False;True;True;1;0;FLOAT4;0,0,0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.DynamicAppendNode;191;-130.0947,-993.0486;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.RangedFloatNode;192;-448.0947,-996.0486;Inherit;False;Property;_Layer02_X_WaterWaveSpeed;Layer02_X_WaterWaveSpeed;25;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;193;-451.0947,-927.0486;Inherit;False;Property;_Layer02_Y_WaterWaveSpeed;Layer02_Y_WaterWaveSpeed;26;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleAddOpNode;143;2176.168,-705.4896;Inherit;False;3;3;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.LerpOp;113;1230.44,-684.604;Inherit;False;3;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT;0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.ColorNode;142;1244.084,-419.0905;Inherit;False;Property;_FoamColor;FoamColor;7;0;Create;True;0;0;0;False;0;False;0,0,0,0;0,0,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.ColorNode;115;768.8707,-817.8586;Inherit;False;Property;_WaterColorA;WaterColorA;2;0;Create;True;0;0;0;False;0;False;0.1839623,0.9539894,1,0;0,0,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.ComponentMaskNode;198;993.4597,-657.1063;Inherit;False;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.ComponentMaskNode;197;1007.477,-807.4941;Inherit;False;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.ComponentMaskNode;196;1455.692,-417.824;Inherit;False;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;194;1990.237,-408.1554;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.RangedFloatNode;160;1367.176,-516.9211;Inherit;False;Property;_Color_Intensity;Color_Intensity;4;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;158;1578.622,-686.055;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.ColorNode;117;764.5506,-649.48;Inherit;False;Property;_WaterColorB;WaterColorB;3;0;Create;True;0;0;0;False;0;False;0.1839623,0.9539894,1,0;0,0,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.FresnelNode;134;766.9617,-476.4396;Inherit;False;Standard;WorldNormal;ViewDir;False;False;5;0;FLOAT3;0,0,1;False;4;FLOAT3;0,0,0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;5;False;1;FLOAT;0 Node;AmplifyShaderEditor.DepthFade;11;785.0253,-99.15695;Inherit;False;True;False;True;2;1;FLOAT3;0,0,0;False;0;FLOAT;1;False;1;FLOAT;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;165;110.3123,-1892.196;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.ComponentMaskNode;184;-302.7041,-1925.643;Inherit;False;True;True;False;False;1;0;FLOAT4;0,0,0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.ComponentMaskNode;185;-300.4579,-1853.767;Inherit;False;False;False;True;True;1;0;FLOAT4;0,0,0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.Vector4Node;186;-565.7627,-1897.536;Half;False;Property;_Layer01B_TillingOffset;Layer01B_Tilling&Offset;18;0;Create;True;0;0;0;False;0;False;1,1,0,0;0,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.DynamicAppendNode;187;-45.21714,-1719.24;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.RangedFloatNode;188;-363.2173,-1722.24;Inherit;False;Property;_Layer01B_X_WaterWaveSpeed;Layer01B_X_WaterWaveSpeed;19;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.BlendNormalsNode;174;926.5636,-2084.77;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.RangedFloatNode;189;-365.2173,-1653.24;Inherit;False;Property;_Layer01B_Y_WaterWaveSpeed;Layer01B_Y_WaterWaveSpeed;20;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;190;273.1449,-1753.493;Half;False;Property;_Layer01B_Normal_Intensity;Layer01B_Normal_Intensity;17;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleAddOpNode;238;416.7759,-1886.615;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;237;126.4908,-1720.534;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.RangedFloatNode;123;267.4001,-2147.301;Half;False;Property;_Layer01A_Normal_Intensity;Layer01A_Normal_Intensity;13;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleAddOpNode;243;260.1437,-2602.959;Inherit;True;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;97;19.87148,-2600.623;Inherit;True;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.ComponentMaskNode;104;-227.6438,-2611.264;Inherit;False;True;True;False;False;1;0;FLOAT4;0,0,0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.ComponentMaskNode;105;-225.3976,-2539.386;Inherit;False;False;False;True;True;1;0;FLOAT4;0,0,0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.Vector4Node;102;-490.7025,-2583.157;Half;False;Property;_Layer01A_TillingOffset;Layer01A_Tilling&Offset;14;0;Create;True;0;0;0;False;0;False;1,1,0,0;0,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;250;10.22119,-2281.088;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.RangedFloatNode;127;241.0763,-1063.435;Half;False;Property;_Layer02_Normal_Intensity;Layer02_Normal_Intensity;23;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.LerpOp;278;529.5359,-651.5961;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;2;False;2;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;19;-865.6122,20.97934;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;ExtraPrePass;0;0;ExtraPrePass;5;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;5;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;0;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;21;62,1;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=ShadowCaster;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;22;62,1;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;True;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;False;False;True;1;LightMode=DepthOnly;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;23;62,1;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;24;62,1;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;5;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=Universal2D;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;25;62,1;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;DepthNormals;0;6;DepthNormals;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;5;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;26;62,1;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;GBuffer;0;7;GBuffer;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;5;True;12;all;0;False;True;1;5;False;;10;False;;1;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalGBuffer;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;27;62,1;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;SceneSelectionPass;0;8;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;28;62,1;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;ScenePickingPass;0;9;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Lit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.SaturateNode;70;-656.1985,-605.5342;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;45;-863.7529,-419.9583;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SaturateNode;74;-655.4971,-221.8919;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SaturateNode;71;-650.6945,-419.697;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.LerpOp;285;295.4122,-490.798;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.LerpOp;286;308.5374,-228.7998;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;2,0,0,0;False;2;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.LerpOp;287;298.0838,-364.8873;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;1,0,0,0;False;2;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.ColorNode;283;56.44625,-468.1606;Inherit;False;Constant;_Color0;Color 0;30;0;Create;True;0;0;0;False;0;False;1,0,0,0;0,0,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.ColorNode;288;56.44433,-298.8;Inherit;False;Constant;_Color1;Color 1;31;0;Create;True;0;0;0;False;0;False;0,1,0,0;0,0,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.ColorNode;289;53.44433,-125.8;Inherit;False;Constant;_Color2;Color 1;31;0;Create;True;0;0;0;False;0;False;0,0,1,0;0,0,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.ComponentMaskNode;290;451.4704,-486.1277;Inherit;False;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.StaticSwitch;284;2314.135,-697.9286;Inherit;False;Property;_MipmapBiasDebug;MipmapBiasDebug;33;0;Create;True;0;0;0;False;0;False;0;0;0;True;;Toggle;2;Key0;Key1;Create;True;True;All;9;1;FLOAT3;0,0,0;False;0;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT3;0,0,0;False;4;FLOAT3;0,0,0;False;5;FLOAT3;0,0,0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT3;0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.LerpOp;273;516.4105,-913.5944;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.LerpOp;275;519.0822,-787.6838;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;1;False;2;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;294;303.6937,-889.8253;Inherit;False;Property;_MipmapBias01;MipmapBias01;29;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;295;301.6937,-753.8253;Inherit;False;Property;_MipmapBias02;MipmapBias02;30;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;296;305.6937,-626.8253;Inherit;False;Property;_MipmapBias03;MipmapBias03;31;0;Create;True;0;0;0;False;0;False;2;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.WorldPosInputsNode;31;-2525.764,-664.2609;Inherit;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 Node;AmplifyShaderEditor.SimpleSubtractOpNode;30;-2314.768,-614.2609;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.WorldSpaceCameraPos;10;-2591.485,-498.3331;Inherit;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 Node;AmplifyShaderEditor.SimpleDivideOpNode;32;-2098.691,-615.5895;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.LengthOpNode;34;-1970.88,-606.7321;Inherit;False;1;0;FLOAT3;0,0,0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SaturateNode;35;-1816.102,-606.078;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleDivideOpNode;39;-2085.518,-404.7636;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.LengthOpNode;40;-1965.368,-405.8663;Inherit;False;1;0;FLOAT3;0,0,0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SaturateNode;41;-1810.592,-405.2123;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SaturateNode;68;-1464.721,-605.3273;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;65;-1626.273,-605.71;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;2;False;1;FLOAT;0 Node;AmplifyShaderEditor.PowerNode;62;-1271.052,-603.4324;Inherit;False;False;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;66;-1625.19,-412.3054;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;2;False;1;FLOAT;0 Node;AmplifyShaderEditor.SaturateNode;67;-1464.32,-410.1935;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.PowerNode;64;-1279.805,-405.6654;Inherit;False;False;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0 Node;AmplifyShaderEditor.OneMinusNode;51;-1121.799,-602.8777;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;38;-2327.618,-342.9636;Inherit;False;Property;_Layer02_Distance;Layer02_Distance;22;0;Create;True;0;0;0;False;0;False;400;100;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;63;-1435.165,-500.5928;Inherit;False;Property;_DistanceBlend;DistanceBlend;32;0;Create;True;0;0;0;False;0;False;15;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.OneMinusNode;44;-1107.723,-405.2585;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;12;603.0253,-78.15701;Inherit;False;Property;_FoamDistance;FoamDistance;8;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;33;-2320.984,-544.6321;Inherit;False;Property;_Layer01_Distance;Layer01_Distance;12;0;Create;True;0;0;0;False;0;False;200;100;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SamplerNode;178;568.9732,-2226.38;Inherit;True;Property;_TextureSample1;Texture Sample 1;26;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;True;Object;-1;MipBias;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SamplerNode;180;569.2859,-1917.022;Inherit;True;Property;_TextureSample2;Texture Sample 1;26;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;True;Object;-1;MipBias;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.TexturePropertyNode;179;300.0626,-2074.334;Inherit;True;Property;_Layer01_Normal;Layer01_Normal;11;2;[NoScaleOffset];[Normal];Create;True;0;0;0;False;0;False;None;None;False;bump;LockedToTexture2D;Texture2D;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1 Node;AmplifyShaderEditor.DynamicAppendNode;181;-281.5409,-2280.118;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.SimpleTimeNode;249;-339.8107,-2061.212;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;183;-572.8866,-2226.052;Inherit;False;Property;_Layer01A_Y_WaterWaveSpeed;Layer01A_Y_WaterWaveSpeed;16;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;182;-575.0731,-2291.482;Inherit;False;Property;_Layer01A_X_WaterWaveSpeed;Layer01A_X_WaterWaveSpeed;15;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SamplerNode;84;592.7482,-1197.278;Inherit;True;Property;_Layer02_Normal;Layer02_Normal;21;1;[NoScaleOffset];Create;True;0;0;0;False;0;False;-1;7ddd65cd8d0236f4b88ccf297ba3d0fa;7ddd65cd8d0236f4b88ccf297ba3d0fa;True;0;True;bump;Auto;True;Object;-1;MipBias;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.WorldReflectionVector;78;1436.162,-1366.905;Inherit;False;False;1;0;FLOAT3;0,0,0;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 Node;AmplifyShaderEditor.RangedFloatNode;146;2133.029,-1297.718;Inherit;False;Property;_Refraction_Intensity;Refraction_Intensity;1;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;144;2342.935,-1383.892;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.ComponentMaskNode;199;2020.628,-1389.641;Inherit;False;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.SamplerNode;80;1699.038,-1390.927;Inherit;True;Property;_SkyMap;SkyMap;0;1;[NoScaleOffset];Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;LockedToCube;False;Object;-1;Auto;Cube;8;0;SAMPLERCUBE;;False;1;FLOAT3;0,0,0;False;2;FLOAT;0;False;3;FLOAT3;0,0,0;False;4;FLOAT3;0,0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.RangedFloatNode;133;2612.784,-596.4034;Inherit;False;Property;_Roghness;Roghness;28;0;Create;True;0;0;0;False;0;False;1;0;0;1;0;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;132;2608.784,-663.4034;Inherit;False;Property;_Metallic;Metallic;27;0;Create;True;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0 Node;AmplifyShaderEditor.BlendNormalsNode;86;1081.031,-1379.656;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;20;3513.129,-698.2351;Float;False;True;-1;2;UnityEditor.ShaderGraphLitGUI;0;12;WaterShader;94348b07e5e8bab40bd6c8a1e3df54cd;True;Forward;0;1;Forward;20;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;4;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Lit;True;5;True;5;d3d11;glcore;gles;gles3;vulkan;0;False;True;1;5;False;;10;False;;1;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForwardOnly;False;False;0;;0;0;Standard;41;Workflow;1;0;Surface;1;638786802299640016; Refraction Model;1;638790979103613890; Blend;0;638786794848199060;Two Sided;1;0;Fragment Normal Space,InvertActionOnDeselection;0;0;Forward Only;1;638790928712405500;Transmission;0;638790963929857264; Transmission Shadow;0.5,False,;0;Translucency;0;638790963936870055; Translucency Strength;1,False,;0; Normal Distortion;0.5,False,;0; Scattering;2,False,;0; Direct;0.9,False,;0; Ambient;0.1,False,;0; Shadow;0.5,False,;0;Cast Shadows;1;638786796334654471; Use Shadow Threshold;0;638786795157504152;Receive Shadows;1;638786427712098523;GPU Instancing;1;0;LOD CrossFade;0;638786795394821364;Built-in Fog;1;638786795223141276;_FinalColorxAlpha;0;638786795366688825;Meta Pass;1;0;Override Baked GI;0;0;Extra Pre Pass;0;0;DOTS Instancing;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,;0; Type;0;0; Tess;16,False,;0; Min;10,False,;0; Max;25,False,;0; Edge Length;16,False,;0; Max Displacement;25,False,;0;Write Depth;1;638786798636617523; Early Z;0;638786798725244899;Vertex Position,InvertActionOnDeselection;1;0;Debug Display;0;0;Clear Coat;0;0;0;10;False;True;True;True;True;False;True;True;False;False;False;;False;0 Node;AmplifyShaderEditor.SaturateNode;14;1037.07,-99.50618;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;155;1030.155,4.607586;Inherit;False;Property;_FoamMaskIntensity;FoamMaskIntensity;10;0;Create;True;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;154;1227.456,-96.79242;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.PowerNode;152;1587.237,-90.79155;Inherit;False;False;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0 Node;AmplifyShaderEditor.SaturateNode;157;1400.313,-95.11019;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SaturateNode;156;1744.856,-90.48888;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.OneMinusNode;195;1731.452,-237.8811;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;153;1305.356,4.307568;Inherit;False;Property;_FoamMaskContrast;FoamMaskContrast;9;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;15;2255.357,-77.79681;Inherit;False;2;2;0;FLOAT;1;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;13;1986.574,-24.95725;Inherit;False;Property;_Alpha;Alpha;6;0;Create;True;0;0;0;False;0;False;1;0;0;1;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleAddOpNode;361;3254.453,-411.4942;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0 Node;AmplifyShaderEditor.ComponentMaskNode;345;2881.315,-432.8261;Inherit;False;False;True;False;True;1;0;FLOAT3;0,0,0;False;1;FLOAT;0 Node;AmplifyShaderEditor.OneMinusNode;348;2933.151,-357.7366;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;352;3109.926,-409.0469;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;1;False;2;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;364;3221.988,-644.3843;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.RangedFloatNode;365;3006.666,-567.446;Inherit;False;Property;_Emissive_Intensity;Emissive_Intensity;5;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 WireConnection;90;0;106;0 WireConnection;90;1;107;0 WireConnection;95;0;90;0 WireConnection;95;2;191;0 WireConnection;106;0;103;0 WireConnection;107;0;103;0 WireConnection;191;0;192;0 WireConnection;191;1;193;0 WireConnection;143;0;144;0 WireConnection;143;1;158;0 WireConnection;143;2;194;0 WireConnection;113;0;197;0 WireConnection;113;1;198;0 WireConnection;113;2;134;0 WireConnection;198;0;117;0 WireConnection;197;0;115;0 WireConnection;196;0;142;0 WireConnection;194;0;196;0 WireConnection;194;1;195;0 WireConnection;158;0;113;0 WireConnection;158;1;160;0 WireConnection;11;0;12;0 WireConnection;165;0;184;0 WireConnection;165;1;185;0 WireConnection;184;0;186;0 WireConnection;185;0;186;0 WireConnection;187;0;188;0 WireConnection;187;1;189;0 WireConnection;174;0;178;0 WireConnection;174;1;180;0 WireConnection;238;0;165;0 WireConnection;238;1;237;0 WireConnection;237;0;187;0 WireConnection;237;1;249;0 WireConnection;243;0;97;0 WireConnection;243;1;250;0 WireConnection;97;0;104;0 WireConnection;97;1;105;0 WireConnection;104;0;102;0 WireConnection;105;0;102;0 WireConnection;250;0;181;0 WireConnection;250;1;249;0 WireConnection;278;1;296;0 WireConnection;278;2;74;0 WireConnection;70;0;51;0 WireConnection;45;0;62;0 WireConnection;45;1;44;0 WireConnection;74;0;64;0 WireConnection;71;0;45;0 WireConnection;285;0;287;0 WireConnection;285;1;283;0 WireConnection;285;2;70;0 WireConnection;286;1;289;0 WireConnection;286;2;74;0 WireConnection;287;0;286;0 WireConnection;287;1;288;0 WireConnection;287;2;71;0 WireConnection;290;0;285;0 WireConnection;284;1;143;0 WireConnection;284;0;290;0 WireConnection;273;0;275;0 WireConnection;273;1;294;0 WireConnection;273;2;70;0 WireConnection;275;0;278;0 WireConnection;275;1;295;0 WireConnection;275;2;71;0 WireConnection;30;0;31;0 WireConnection;30;1;10;0 WireConnection;32;0;30;0 WireConnection;32;1;33;0 WireConnection;34;0;32;0 WireConnection;35;0;34;0 WireConnection;39;0;30;0 WireConnection;39;1;38;0 WireConnection;40;0;39;0 WireConnection;41;0;40;0 WireConnection;68;0;65;0 WireConnection;65;0;35;0 WireConnection;62;0;68;0 WireConnection;62;1;63;0 WireConnection;66;0;41;0 WireConnection;67;0;66;0 WireConnection;64;0;67;0 WireConnection;64;1;63;0 WireConnection;51;0;62;0 WireConnection;44;0;64;0 WireConnection;178;0;179;0 WireConnection;178;1;243;0 WireConnection;178;2;273;0 WireConnection;178;5;123;0 WireConnection;180;0;179;0 WireConnection;180;1;238;0 WireConnection;180;2;273;0 WireConnection;180;5;190;0 WireConnection;181;0;182;0 WireConnection;181;1;183;0 WireConnection;84;1;95;0 WireConnection;84;2;273;0 WireConnection;84;5;127;0 WireConnection;78;0;86;0 WireConnection;144;0;199;0 WireConnection;144;1;146;0 WireConnection;199;0;80;0 WireConnection;80;1;78;0 WireConnection;86;0;174;0 WireConnection;86;1;84;0 WireConnection;20;0;284;0 WireConnection;20;1;86;0 WireConnection;20;2;364;0 WireConnection;20;3;132;0 WireConnection;20;4;133;0 WireConnection;20;6;15;0 WireConnection;20;13;361;0 WireConnection;14;0;11;0 WireConnection;154;0;14;0 WireConnection;154;1;155;0 WireConnection;152;0;157;0 WireConnection;152;1;153;0 WireConnection;157;0;154;0 WireConnection;156;0;152;0 WireConnection;195;0;156;0 WireConnection;15;0;156;0 WireConnection;15;1;13;0 WireConnection;361;0;352;0 WireConnection;345;0;86;0 WireConnection;348;0;134;0 WireConnection;352;0;345;0 WireConnection;352;1;348;0 WireConnection;352;2;15;0 WireConnection;364;0;284;0 WireConnection;364;1;365;0 ASEEND*/ //CHKSM=8799D7FEBAD7CD0042AE70B43788103C72940BD7