// Made with Amplify Shader Editor v1.9.4.3 // Available at the Unity Asset Store - http://u3d.as/y3X Shader "Piloto Studio/Screenspace Alpha" { Properties { [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5 [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1) _MainTex("Main Texture", 2D) = "white" {} _MainTextureChannel("Main Texture Channel", Vector) = (1,1,1,0) _MainTexturePanning("Main Texture Panning", Vector) = (0,0,0,0) _AlphaOverride("Alpha Override", 2D) = "white" {} _AlphaOverridePanning("Alpha Override Panning", Vector) = (0,0,0,0) _AlphaOverrideChannel("Alpha Override Channel", Vector) = (1,0,0,0) _DetailNoise("Detail Noise", 2D) = "white" {} _DetailNoisePanning("Detail Noise Panning", Vector) = (0,0,0,0) _DetailDistortionChannel("Detail Distortion Channel", Vector) = (1,0,0,0) _DistortionStrenght("Distortion Strenght", Float) = 0 _DetailMultiplyChannel("Detail Multiply Channel", Vector) = (0,0,0,0) _DetailAdditiveChannel("Detail Additive Channel", Vector) = (0,0,0,0) _Desaturate("Desaturate?", Range( 0 , 1)) = 0 //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5 //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16 //_TessMin( "Tess Min Distance", Float ) = 10 //_TessMax( "Tess Max Distance", Float ) = 25 //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16 //_TessMaxDisp( "Tess Max Displacement", Float ) = 25 [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) = "" {} [HideInInspector][ToggleOff] _ReceiveShadows("Receive Shadows", Float) = 1.0 } SubShader { LOD 0 Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Unlit" } Cull Back AlphaToMask Off HLSLINCLUDE #pragma target 5.0 #pragma prefer_hlslcc gles // ensure rendering platforms toggle list is visible #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl" #ifndef ASE_TESS_FUNCS #define ASE_TESS_FUNCS float4 FixedTess( float tessValue ) { return tessValue; } float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos ) { float3 wpos = mul(o2w,vertex).xyz; float dist = distance (wpos, cameraPos); float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess; return f; } float4 CalcTriEdgeTessFactors (float3 triVertexFactors) { float4 tess; tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z); tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z); tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y); tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f; return tess; } float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams ) { float dist = distance (0.5 * (wpos0+wpos1), cameraPos); float len = distance(wpos0, wpos1); float f = max(len * scParams.y / (edgeLen * dist), 1.0); return f; } float DistanceFromPlane (float3 pos, float4 plane) { float d = dot (float4(pos,1.0f), plane); return d; } bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] ) { float4 planeTest; planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f ); planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f ); planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f ); planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f ); return !all (planeTest); } float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos ) { float3 f; f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos); f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos); f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos); return CalcTriEdgeTessFactors (f); } float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams ) { float3 pos0 = mul(o2w,v0).xyz; float3 pos1 = mul(o2w,v1).xyz; float3 pos2 = mul(o2w,v2).xyz; float4 tess; tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); tess.w = (tess.x + tess.y + tess.z) / 3.0f; return tess; } float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] ) { float3 pos0 = mul(o2w,v0).xyz; float3 pos1 = mul(o2w,v1).xyz; float3 pos2 = mul(o2w,v2).xyz; float4 tess; if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes)) { tess = 0.0f; } else { tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); tess.w = (tess.x + tess.y + tess.z) / 3.0f; } return tess; } #endif //ASE_TESS_FUNCS ENDHLSL Pass { Name "Forward" Tags { "LightMode"="UniversalForwardOnly" } Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha ZWrite Off ZTest LEqual Offset 0 , 0 ColorMask RGBA HLSLPROGRAM #pragma shader_feature_local _RECEIVE_SHADOWS_OFF #pragma multi_compile_instancing #pragma instancing_options renderinglayer #define _SURFACE_TYPE_TRANSPARENT 1 #define ASE_SRP_VERSION 120108 #pragma multi_compile _ DOTS_INSTANCING_ON #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 #pragma multi_compile _ DIRLIGHTMAP_COMBINED #pragma multi_compile _ LIGHTMAP_ON #pragma multi_compile _ DYNAMICLIGHTMAP_ON #pragma multi_compile_fragment _ DEBUG_DISPLAY #pragma vertex vert #pragma fragment frag #define SHADERPASS SHADERPASS_UNLIT #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/DBuffer.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl" #define ASE_NEEDS_FRAG_COLOR struct VertexInput { float4 positionOS : POSITION; float3 normalOS : NORMAL; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float4 positionCS : SV_POSITION; #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 positionWS : TEXCOORD0; #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) float4 shadowCoord : TEXCOORD1; #endif #ifdef ASE_FOG float fogFactor : TEXCOORD2; #endif float4 ase_color : COLOR; float4 ase_texcoord3 : TEXCOORD3; float4 ase_texcoord4 : TEXCOORD4; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) float4 _DetailDistortionChannel; float4 _MainTextureChannel; float4 _DetailMultiplyChannel; float4 _DetailAdditiveChannel; float4 _AlphaOverrideChannel; float2 _MainTexturePanning; float2 _DetailNoisePanning; float2 _AlphaOverridePanning; float _DistortionStrenght; float _Desaturate; #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END sampler2D _MainTex; sampler2D _DetailNoise; sampler2D _AlphaOverride; VertexOutput VertexFunction( VertexInput v ) { VertexOutput o = (VertexOutput)0; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); float4 ase_clipPos = TransformObjectToHClip((v.positionOS).xyz); float4 screenPos = ComputeScreenPos(ase_clipPos); o.ase_texcoord4 = screenPos; o.ase_color = v.ase_color; o.ase_texcoord3 = v.ase_texcoord; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.positionOS.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.positionOS.xyz = vertexValue; #else v.positionOS.xyz += vertexValue; #endif v.normalOS = v.normalOS; float3 positionWS = TransformObjectToWorld( v.positionOS.xyz ); float4 positionCS = TransformWorldToHClip( positionWS ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) o.positionWS = 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 #ifdef ASE_FOG o.fogFactor = ComputeFogFactor( positionCS.z ); #endif o.positionCS = positionCS; return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 normalOS : NORMAL; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.positionOS; o.normalOS = v.normalOS; o.ase_color = v.ase_color; o.ase_texcoord = v.ase_texcoord; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if 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.positionOS = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.positionOS.xyz - patch[i].normalOS * (dot(o.positionOS.xyz, patch[i].normalOS) - dot(patch[i].vertex.xyz, patch[i].normalOS)); float phongStrength = _TessPhongStrength; o.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.positionOS.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else VertexOutput vert ( VertexInput v ) { return VertexFunction( v ); } #endif 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.positionWS; #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 texCoord81 = IN.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 ); float2 panner80 = ( 1.0 * _Time.y * _DetailNoisePanning + texCoord81); float4 tex2DNode79 = tex2D( _DetailNoise, panner80 ); float4 break17_g63 = tex2DNode79; float4 appendResult18_g63 = (float4(break17_g63.x , break17_g63.y , break17_g63.z , break17_g63.w)); float4 clampResult19_g63 = clamp( ( appendResult18_g63 * _DetailDistortionChannel ) , float4( 0,0,0,0 ) , float4( 1,1,1,1 ) ); float4 break2_g63 = clampResult19_g63; float clampResult20_g63 = clamp( ( break2_g63.x + break2_g63.y + break2_g63.z + break2_g63.w ) , 0.0 , 1.0 ); float DistortionNoise90 = clampResult20_g63; float4 screenPos = IN.ase_texcoord4; float4 ase_screenPosNorm = screenPos / screenPos.w; ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; float2 panner22 = ( 1.0 * _Time.y * _MainTexturePanning + ( ( DistortionNoise90 * _DistortionStrenght ) + ( (float2( 0,0 ) + ((ase_screenPosNorm).xy - float2( 0,0 )) * (float2( 1,1 ) - float2( 0,0 )) / (float2( 1,1 ) - float2( 0,0 ))) * float2( 4,4 ) ) )); float4 tex2DNode150 = tex2D( _MainTex, panner22 ); float4 break17_g60 = tex2DNode150; float4 appendResult18_g60 = (float4(break17_g60.x , break17_g60.y , break17_g60.z , break17_g60.w)); float4 clampResult19_g60 = clamp( ( appendResult18_g60 * _MainTextureChannel ) , float4( 0,0,0,0 ) , float4( 1,1,1,1 ) ); float4 break2_g60 = clampResult19_g60; float clampResult20_g60 = clamp( ( break2_g60.x + break2_g60.y + break2_g60.z + break2_g60.w ) , 0.0 , 1.0 ); float3 temp_cast_2 = (clampResult20_g60).xxx; float3 desaturateInitialColor158 = temp_cast_2; float desaturateDot158 = dot( desaturateInitialColor158, float3( 0.299, 0.587, 0.114 )); float3 desaturateVar158 = lerp( desaturateInitialColor158, desaturateDot158.xxx, _Desaturate ); float4 texCoord162 = IN.ase_texcoord3; texCoord162.xy = IN.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 ); float4 break17_g62 = tex2DNode79; float4 appendResult18_g62 = (float4(break17_g62.x , break17_g62.y , break17_g62.z , break17_g62.w)); float4 clampResult19_g62 = clamp( ( appendResult18_g62 * _DetailMultiplyChannel ) , float4( 0,0,0,0 ) , float4( 1,1,1,1 ) ); float4 break2_g62 = clampResult19_g62; float clampResult20_g62 = clamp( ( break2_g62.x + break2_g62.y + break2_g62.z + break2_g62.w ) , 0.0 , 1.0 ); float ifLocalVar106 = 0; if( ( _DetailMultiplyChannel.x + _DetailMultiplyChannel.y + _DetailMultiplyChannel.z + _DetailMultiplyChannel.w ) <= 0.0 ) ifLocalVar106 = 1.0; else ifLocalVar106 = clampResult20_g62; float MultiplyNoise92 = ifLocalVar106; float4 break17_g57 = tex2DNode79; float4 appendResult18_g57 = (float4(break17_g57.x , break17_g57.y , break17_g57.z , break17_g57.w)); float4 clampResult19_g57 = clamp( ( appendResult18_g57 * _DetailAdditiveChannel ) , float4( 0,0,0,0 ) , float4( 1,1,1,1 ) ); float4 break2_g57 = clampResult19_g57; float clampResult20_g57 = clamp( ( break2_g57.x + break2_g57.y + break2_g57.z + break2_g57.w ) , 0.0 , 1.0 ); float AdditiveNoise91 = clampResult20_g57; float4 texCoord60 = IN.ase_texcoord3; texCoord60.xy = IN.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 ); float2 texCoord43 = IN.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 ); float2 panner44 = ( 1.0 * _Time.y * _AlphaOverridePanning + texCoord43); float4 tex2DNode45 = tex2D( _AlphaOverride, panner44 ); float4 break2_g50 = ( tex2DNode45 * _AlphaOverrideChannel ); float AlphaOverride49 = saturate( ( break2_g50.x + break2_g50.y + break2_g50.z + break2_g50.w ) ); float temp_output_3_0_g51 = ( texCoord60.w - ( 1.0 - AlphaOverride49 ) ); float3 BakedAlbedo = 0; float3 BakedEmission = 0; float3 Color = ( ( IN.ase_color * float4( desaturateVar158 , 0.0 ) * ( texCoord162.z + 1.0 ) * MultiplyNoise92 ) + AdditiveNoise91 ).rgb; float Alpha = ( IN.ase_color.a * saturate( saturate( ( temp_output_3_0_g51 / fwidth( temp_output_3_0_g51 ) ) ) ) * AlphaOverride49 ); float AlphaClipThreshold = 0.5; float AlphaClipThresholdShadow = 0.5; #ifdef _ALPHATEST_ON clip( Alpha - AlphaClipThreshold ); #endif #if defined(_DBUFFER) ApplyDecalToBaseColor(IN.positionCS, Color); #endif #ifdef LOD_FADE_CROSSFADE LODDitheringTransition( IN.positionCS.xyz, unity_LODFade.x ); #endif #ifdef ASE_FOG Color = MixFog( Color, IN.fogFactor ); #endif return half4( Color, Alpha ); } ENDHLSL } Pass { Name "DepthOnly" Tags { "LightMode"="DepthOnly" } ZWrite On ColorMask 0 AlphaToMask Off HLSLPROGRAM #pragma multi_compile_instancing #define _SURFACE_TYPE_TRANSPARENT 1 #define ASE_SRP_VERSION 120108 #pragma multi_compile _ DOTS_INSTANCING_ON #pragma vertex vert #pragma fragment frag #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.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/ShaderGraphFunctions.hlsl" struct VertexInput { float4 positionOS : POSITION; float3 normalOS : NORMAL; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float4 positionCS : SV_POSITION; #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) float3 positionWS : TEXCOORD0; #endif #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) float4 shadowCoord : TEXCOORD1; #endif float4 ase_color : COLOR; float4 ase_texcoord2 : TEXCOORD2; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) float4 _DetailDistortionChannel; float4 _MainTextureChannel; float4 _DetailMultiplyChannel; float4 _DetailAdditiveChannel; float4 _AlphaOverrideChannel; float2 _MainTexturePanning; float2 _DetailNoisePanning; float2 _AlphaOverridePanning; float _DistortionStrenght; float _Desaturate; #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END sampler2D _AlphaOverride; 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_color = v.ase_color; o.ase_texcoord2 = v.ase_texcoord; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.positionOS.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.positionOS.xyz = vertexValue; #else v.positionOS.xyz += vertexValue; #endif v.normalOS = v.normalOS; float3 positionWS = TransformObjectToWorld( v.positionOS.xyz ); #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) o.positionWS = positionWS; #endif o.positionCS = TransformWorldToHClip( positionWS ); #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) VertexPositionInputs vertexInput = (VertexPositionInputs)0; vertexInput.positionWS = positionWS; vertexInput.positionCS = o.positionCS; o.shadowCoord = GetShadowCoord( vertexInput ); #endif return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 normalOS : NORMAL; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.positionOS; o.normalOS = v.normalOS; o.ase_color = v.ase_color; o.ase_texcoord = v.ase_texcoord; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if 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.positionOS = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.positionOS.xyz - patch[i].normalOS * (dot(o.positionOS.xyz, patch[i].normalOS) - dot(patch[i].vertex.xyz, patch[i].normalOS)); float phongStrength = _TessPhongStrength; o.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.positionOS.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else VertexOutput vert ( VertexInput v ) { return VertexFunction( v ); } #endif 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.positionWS; #endif float4 ShadowCoords = float4( 0, 0, 0, 0 ); #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) ShadowCoords = IN.shadowCoord; #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); #endif #endif float4 texCoord60 = IN.ase_texcoord2; texCoord60.xy = IN.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 ); float2 texCoord43 = IN.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 ); float2 panner44 = ( 1.0 * _Time.y * _AlphaOverridePanning + texCoord43); float4 tex2DNode45 = tex2D( _AlphaOverride, panner44 ); float4 break2_g50 = ( tex2DNode45 * _AlphaOverrideChannel ); float AlphaOverride49 = saturate( ( break2_g50.x + break2_g50.y + break2_g50.z + break2_g50.w ) ); float temp_output_3_0_g51 = ( texCoord60.w - ( 1.0 - AlphaOverride49 ) ); float Alpha = ( IN.ase_color.a * saturate( saturate( ( temp_output_3_0_g51 / fwidth( temp_output_3_0_g51 ) ) ) ) * AlphaOverride49 ); float AlphaClipThreshold = 0.5; #ifdef _ALPHATEST_ON clip(Alpha - AlphaClipThreshold); #endif #ifdef LOD_FADE_CROSSFADE LODDitheringTransition( IN.positionCS.xyz, unity_LODFade.x ); #endif return 0; } ENDHLSL } Pass { Name "SceneSelectionPass" Tags { "LightMode"="SceneSelectionPass" } Cull Off AlphaToMask Off HLSLPROGRAM #define _SURFACE_TYPE_TRANSPARENT 1 #define ASE_SRP_VERSION 120108 #pragma multi_compile _ DOTS_INSTANCING_ON #pragma vertex vert #pragma fragment frag #define ATTRIBUTES_NEED_NORMAL #define ATTRIBUTES_NEED_TANGENT #define SHADERPASS SHADERPASS_DEPTHONLY #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" struct VertexInput { float4 positionOS : POSITION; float3 normalOS : NORMAL; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float4 positionCS : SV_POSITION; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) float4 _DetailDistortionChannel; float4 _MainTextureChannel; float4 _DetailMultiplyChannel; float4 _DetailAdditiveChannel; float4 _AlphaOverrideChannel; float2 _MainTexturePanning; float2 _DetailNoisePanning; float2 _AlphaOverridePanning; float _DistortionStrenght; float _Desaturate; #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END sampler2D _AlphaOverride; int _ObjectId; int _PassValue; struct SurfaceDescription { float Alpha; float AlphaClipThreshold; }; VertexOutput VertexFunction(VertexInput v ) { VertexOutput o; ZERO_INITIALIZE(VertexOutput, o); UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.ase_color = v.ase_color; o.ase_texcoord = v.ase_texcoord; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.positionOS.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.positionOS.xyz = vertexValue; #else v.positionOS.xyz += vertexValue; #endif v.normalOS = v.normalOS; float3 positionWS = TransformObjectToWorld( v.positionOS.xyz ); o.positionCS = TransformWorldToHClip(positionWS); return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 normalOS : NORMAL; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.positionOS; o.normalOS = v.normalOS; o.ase_color = v.ase_color; o.ase_texcoord = v.ase_texcoord; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if 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.positionOS = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.positionOS.xyz - patch[i].normalOS * (dot(o.positionOS.xyz, patch[i].normalOS) - dot(patch[i].vertex.xyz, patch[i].normalOS)); float phongStrength = _TessPhongStrength; o.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.positionOS.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else VertexOutput vert ( VertexInput v ) { return VertexFunction( v ); } #endif half4 frag(VertexOutput IN ) : SV_TARGET { SurfaceDescription surfaceDescription = (SurfaceDescription)0; float4 texCoord60 = IN.ase_texcoord; texCoord60.xy = IN.ase_texcoord.xy * float2( 1,1 ) + float2( 0,0 ); float2 texCoord43 = IN.ase_texcoord.xy * float2( 1,1 ) + float2( 0,0 ); float2 panner44 = ( 1.0 * _Time.y * _AlphaOverridePanning + texCoord43); float4 tex2DNode45 = tex2D( _AlphaOverride, panner44 ); float4 break2_g50 = ( tex2DNode45 * _AlphaOverrideChannel ); float AlphaOverride49 = saturate( ( break2_g50.x + break2_g50.y + break2_g50.z + break2_g50.w ) ); float temp_output_3_0_g51 = ( texCoord60.w - ( 1.0 - AlphaOverride49 ) ); surfaceDescription.Alpha = ( IN.ase_color.a * saturate( saturate( ( temp_output_3_0_g51 / fwidth( temp_output_3_0_g51 ) ) ) ) * AlphaOverride49 ); surfaceDescription.AlphaClipThreshold = 0.5; #if _ALPHATEST_ON float alphaClipThreshold = 0.01f; #if ALPHA_CLIP_THRESHOLD alphaClipThreshold = surfaceDescription.AlphaClipThreshold; #endif clip(surfaceDescription.Alpha - alphaClipThreshold); #endif half4 outColor = half4(_ObjectId, _PassValue, 1.0, 1.0); return outColor; } ENDHLSL } Pass { Name "ScenePickingPass" Tags { "LightMode"="Picking" } AlphaToMask Off HLSLPROGRAM #define _SURFACE_TYPE_TRANSPARENT 1 #define ASE_SRP_VERSION 120108 #pragma multi_compile _ DOTS_INSTANCING_ON #pragma vertex vert #pragma fragment frag #define ATTRIBUTES_NEED_NORMAL #define ATTRIBUTES_NEED_TANGENT #define SHADERPASS SHADERPASS_DEPTHONLY #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" struct VertexInput { float4 positionOS : POSITION; float3 normalOS : NORMAL; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float4 positionCS : SV_POSITION; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) float4 _DetailDistortionChannel; float4 _MainTextureChannel; float4 _DetailMultiplyChannel; float4 _DetailAdditiveChannel; float4 _AlphaOverrideChannel; float2 _MainTexturePanning; float2 _DetailNoisePanning; float2 _AlphaOverridePanning; float _DistortionStrenght; float _Desaturate; #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END sampler2D _AlphaOverride; float4 _SelectionID; struct SurfaceDescription { float Alpha; float AlphaClipThreshold; }; VertexOutput VertexFunction(VertexInput v ) { VertexOutput o; ZERO_INITIALIZE(VertexOutput, o); UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.ase_color = v.ase_color; o.ase_texcoord = v.ase_texcoord; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.positionOS.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.positionOS.xyz = vertexValue; #else v.positionOS.xyz += vertexValue; #endif v.normalOS = v.normalOS; float3 positionWS = TransformObjectToWorld( v.positionOS.xyz ); o.positionCS = TransformWorldToHClip(positionWS); return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 normalOS : NORMAL; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.positionOS; o.normalOS = v.normalOS; o.ase_color = v.ase_color; o.ase_texcoord = v.ase_texcoord; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if 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.positionOS = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.positionOS.xyz - patch[i].normalOS * (dot(o.positionOS.xyz, patch[i].normalOS) - dot(patch[i].vertex.xyz, patch[i].normalOS)); float phongStrength = _TessPhongStrength; o.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.positionOS.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else VertexOutput vert ( VertexInput v ) { return VertexFunction( v ); } #endif half4 frag(VertexOutput IN ) : SV_TARGET { SurfaceDescription surfaceDescription = (SurfaceDescription)0; float4 texCoord60 = IN.ase_texcoord; texCoord60.xy = IN.ase_texcoord.xy * float2( 1,1 ) + float2( 0,0 ); float2 texCoord43 = IN.ase_texcoord.xy * float2( 1,1 ) + float2( 0,0 ); float2 panner44 = ( 1.0 * _Time.y * _AlphaOverridePanning + texCoord43); float4 tex2DNode45 = tex2D( _AlphaOverride, panner44 ); float4 break2_g50 = ( tex2DNode45 * _AlphaOverrideChannel ); float AlphaOverride49 = saturate( ( break2_g50.x + break2_g50.y + break2_g50.z + break2_g50.w ) ); float temp_output_3_0_g51 = ( texCoord60.w - ( 1.0 - AlphaOverride49 ) ); surfaceDescription.Alpha = ( IN.ase_color.a * saturate( saturate( ( temp_output_3_0_g51 / fwidth( temp_output_3_0_g51 ) ) ) ) * AlphaOverride49 ); surfaceDescription.AlphaClipThreshold = 0.5; #if _ALPHATEST_ON float alphaClipThreshold = 0.01f; #if ALPHA_CLIP_THRESHOLD alphaClipThreshold = surfaceDescription.AlphaClipThreshold; #endif clip(surfaceDescription.Alpha - alphaClipThreshold); #endif half4 outColor = 0; outColor = _SelectionID; return outColor; } ENDHLSL } Pass { Name "DepthNormals" Tags { "LightMode"="DepthNormalsOnly" } ZTest LEqual ZWrite On HLSLPROGRAM #pragma multi_compile_instancing #define _SURFACE_TYPE_TRANSPARENT 1 #define ASE_SRP_VERSION 120108 #pragma multi_compile _ DOTS_INSTANCING_ON #pragma vertex vert #pragma fragment frag #define ATTRIBUTES_NEED_NORMAL #define ATTRIBUTES_NEED_TANGENT #define VARYINGS_NEED_NORMAL_WS #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.core/ShaderLibrary/TextureStack.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" struct VertexInput { float4 positionOS : POSITION; float3 normalOS : NORMAL; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct VertexOutput { float4 positionCS : SV_POSITION; float3 normalWS : TEXCOORD0; float4 ase_color : COLOR; float4 ase_texcoord1 : TEXCOORD1; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; CBUFFER_START(UnityPerMaterial) float4 _DetailDistortionChannel; float4 _MainTextureChannel; float4 _DetailMultiplyChannel; float4 _DetailAdditiveChannel; float4 _AlphaOverrideChannel; float2 _MainTexturePanning; float2 _DetailNoisePanning; float2 _AlphaOverridePanning; float _DistortionStrenght; float _Desaturate; #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif CBUFFER_END sampler2D _AlphaOverride; struct SurfaceDescription { float Alpha; float AlphaClipThreshold; }; VertexOutput VertexFunction(VertexInput v ) { VertexOutput o; ZERO_INITIALIZE(VertexOutput, o); UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.ase_color = v.ase_color; o.ase_texcoord1 = v.ase_texcoord; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.positionOS.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.positionOS.xyz = vertexValue; #else v.positionOS.xyz += vertexValue; #endif v.normalOS = v.normalOS; float3 positionWS = TransformObjectToWorld( v.positionOS.xyz ); float3 normalWS = TransformObjectToWorldNormal(v.normalOS); o.positionCS = TransformWorldToHClip(positionWS); o.normalWS.xyz = normalWS; return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; float3 normalOS : NORMAL; float4 ase_color : COLOR; float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( VertexInput v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.positionOS; o.normalOS = v.normalOS; o.ase_color = v.ase_color; o.ase_texcoord = v.ase_texcoord; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; float4 tf = 1; float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; #if 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.positionOS = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; for (int i = 0; i < 3; ++i) pp[i] = o.positionOS.xyz - patch[i].normalOS * (dot(o.positionOS.xyz, patch[i].normalOS) - dot(patch[i].vertex.xyz, patch[i].normalOS)); float phongStrength = _TessPhongStrength; o.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.positionOS.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else VertexOutput vert ( VertexInput v ) { return VertexFunction( v ); } #endif half4 frag(VertexOutput IN ) : SV_TARGET { SurfaceDescription surfaceDescription = (SurfaceDescription)0; float4 texCoord60 = IN.ase_texcoord1; texCoord60.xy = IN.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 ); float2 texCoord43 = IN.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 ); float2 panner44 = ( 1.0 * _Time.y * _AlphaOverridePanning + texCoord43); float4 tex2DNode45 = tex2D( _AlphaOverride, panner44 ); float4 break2_g50 = ( tex2DNode45 * _AlphaOverrideChannel ); float AlphaOverride49 = saturate( ( break2_g50.x + break2_g50.y + break2_g50.z + break2_g50.w ) ); float temp_output_3_0_g51 = ( texCoord60.w - ( 1.0 - AlphaOverride49 ) ); surfaceDescription.Alpha = ( IN.ase_color.a * saturate( saturate( ( temp_output_3_0_g51 / fwidth( temp_output_3_0_g51 ) ) ) ) * AlphaOverride49 ); surfaceDescription.AlphaClipThreshold = 0.5; #if _ALPHATEST_ON clip(surfaceDescription.Alpha - surfaceDescription.AlphaClipThreshold); #endif #ifdef LOD_FADE_CROSSFADE LODDitheringTransition( IN.positionCS.xyz, unity_LODFade.x ); #endif float3 normalWS = IN.normalWS; return half4(NormalizeNormalPerPixel(normalWS), 0.0); } ENDHLSL } } CustomEditor "UnityEditor.ShaderGraphUnlitGUI" FallBack "Hidden/Shader Graph/FallbackError" Fallback Off } /*ASEBEGIN Version=19403 Node;AmplifyShaderEditor.CommentaryNode;50;-642.348,-1541.705;Inherit;False;1249.023;565.425;Alpha Override;8;43;44;45;47;48;49;51;157;;0,0.5461459,1,1;0;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;43;-592.348,-1491.705;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.Vector2Node;51;-616.1282,-1132.945;Inherit;False;Property;_AlphaOverridePanning;Alpha Override Panning;4;0;Create;True;0;0;0;False;0;False;0,0;0,0;0;3;FLOAT2;0;FLOAT;1;FLOAT;2 Node;AmplifyShaderEditor.PannerNode;44;-352.3488,-1443.705;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 Node;AmplifyShaderEditor.TexturePropertyNode;47;-399.7247,-1273.259;Inherit;True;Property;_AlphaOverride;Alpha Override;3;0;Create;True;0;0;0;False;0;False;None;None;False;white;Auto;Texture2D;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1 Node;AmplifyShaderEditor.SamplerNode;45;-160.851,-1388.807;Inherit;True;Property;_TextureSample2;Texture Sample 2;4;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.Vector4Node;48;-97.32484,-1188.281;Inherit;False;Property;_AlphaOverrideChannel;Alpha Override Channel;5;0;Create;True;0;0;0;False;0;False;1,0,0,0;1,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.FunctionNode;157;239.2312,-1200.401;Inherit;False;Channel Picker Alpha;-1;;50;e49841402b321534583d1dc019041b68;0;2;5;FLOAT4;1,0,0,0;False;7;FLOAT4;0,0,0,1;False;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;49;382.6752,-1380.28;Inherit;False;AlphaOverride;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;52;-304.4512,205.567;Inherit;False;49;AlphaOverride;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.OneMinusNode;64;31.54882,205.567;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;60;15.54882,285.5669;Inherit;False;0;-1;4;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.FunctionNode;70;287.5488,253.5669;Inherit;False;Step Antialiasing;-1;;51;2a825e80dfb3290468194f83380797bd;0;2;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.CommentaryNode;103;-784.2378,-2597.328;Inherit;False;1462.886;1030;Extra Noise Setup;14;106;105;86;91;87;92;90;79;85;80;83;81;84;108;;1,1,1,1;0;0 Node;AmplifyShaderEditor.SaturateNode;68;495.5488,285.5669;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.VertexColorNode;61;270.9582,23.08784;Inherit;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.CommentaryNode;34;-2955.764,-1202.928;Inherit;False;2252.64;1173.84;Main Texture Set Vars;17;149;23;147;27;110;145;146;138;135;22;136;10;111;109;150;151;156;;0,0.5461459,1,1;0;0 Node;AmplifyShaderEditor.BreakToComponentsNode;110;-1053,-596.252;Inherit;False;COLOR;1;0;COLOR;0,0,0,0;False;16;FLOAT;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT;5;FLOAT;6;FLOAT;7;FLOAT;8;FLOAT;9;FLOAT;10;FLOAT;11;FLOAT;12;FLOAT;13;FLOAT;14;FLOAT;15 Node;AmplifyShaderEditor.GetLocalVarNode;135;-2339.662,-547.2616;Inherit;False;90;DistortionNoise;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;109;-1181,-596.252;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT4;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.Vector4Node;10;-1419.139,-362.7703;Inherit;False;Property;_MainTextureChannel;Main Texture Channel;1;0;Create;True;0;0;0;False;0;False;1,1,1,0;1,1,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SamplerNode;150;-1508.96,-631.8519;Inherit;True;Property;_TextureSample0;Texture Sample 0;12;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.RangedFloatNode;149;-2394.645,-634.368;Inherit;False;Property;_DistortionStrenght;Distortion Strenght;9;0;Create;True;0;0;0;False;0;False;0;1;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;136;-2124.063,-659.4615;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleAddOpNode;138;-1995.662,-662.2618;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;164;170.5334,-373.1786;Inherit;False;4;4;0;COLOR;0,0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.Vector2Node;23;-2017.901,-501.3873;Inherit;False;Property;_MainTexturePanning;Main Texture Panning;2;0;Create;True;0;0;0;False;0;False;0,0;0.2,0.2;0;3;FLOAT2;0;FLOAT;1;FLOAT;2 Node;AmplifyShaderEditor.VertexColorNode;37;-168.5735,-497.7309;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.RangedFloatNode;159;-462.6389,-257.7749;Inherit;False;Property;_Desaturate;Desaturate?;12;0;Create;True;0;0;0;False;0;False;0;1;0;1;0;1;FLOAT;0 Node;AmplifyShaderEditor.DesaturateOpNode;158;-165.6389,-328.7749;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;162;-382.7326,-134.1047;Inherit;False;0;-1;4;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SimpleAddOpNode;163;-149.0954,-220.5375;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;98;-292.8669,32.71658;Inherit;False;92;MultiplyNoise;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;40;627.2988,159.4486;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.TexturePropertyNode;83;-482.86,-2241.615;Inherit;True;Property;_DetailNoise;Detail Noise;6;0;Create;True;0;0;0;False;0;False;None;None;False;white;Auto;Texture2D;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1 Node;AmplifyShaderEditor.SimpleAddOpNode;105;-231.1713,-1862.338;Inherit;False;4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;101;136.5273,-200.7529;Inherit;False;91;AdditiveNoise;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.FunctionNode;155;132.2033,-2464.99;Inherit;False;Channel Picker;-1;;57;dc5f4cb24a8bdf448b40a1ec5866280e;0;2;5;FLOAT4;1,0,0,0;False;7;FLOAT4;0,0,0,1;False;1;FLOAT;0 Node;AmplifyShaderEditor.TFHCRemapNode;147;-2375.829,-403.4063;Inherit;True;5;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT2;1,1;False;3;FLOAT2;0,0;False;4;FLOAT2;1,1;False;1;FLOAT2;0 Node;AmplifyShaderEditor.Vector2Node;84;-734.2378,-2214.328;Inherit;False;Property;_DetailNoisePanning;Detail Noise Panning;7;0;Create;True;0;0;0;False;0;False;0,0;0.2,-0.2;0;3;FLOAT2;0;FLOAT;1;FLOAT;2 Node;AmplifyShaderEditor.ComponentMaskNode;146;-2604.829,-359.4064;Inherit;False;True;True;False;False;1;0;FLOAT4;0,0,0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.Vector4Node;87;-153.2379,-2547.328;Inherit;False;Property;_DetailAdditiveChannel;Detail Additive Channel;11;0;Create;True;0;0;0;False;0;False;0,0,0,0;0,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.DynamicAppendNode;111;-864.0005,-549.252;Inherit;False;FLOAT4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT4;0 Node;AmplifyShaderEditor.FunctionNode;156;-1069.835,-363.9704;Inherit;False;Channel Picker;-1;;60;dc5f4cb24a8bdf448b40a1ec5866280e;0;2;5;FLOAT4;1,0,0,0;False;7;FLOAT4;0,0,0,1;False;1;FLOAT;0 Node;AmplifyShaderEditor.ConditionalIfNode;106;259.8287,-1914.338;Inherit;False;False;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.FunctionNode;153;-13.35168,-1929.953;Inherit;False;Channel Picker;-1;;62;dc5f4cb24a8bdf448b40a1ec5866280e;0;2;5;FLOAT4;1,0,0,0;False;7;FLOAT4;0,0,0,1;False;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;92;431.6483,-1884.953;Inherit;False;MultiplyNoise;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.Vector4Node;85;-180.2379,-2145.328;Inherit;False;Property;_DetailDistortionChannel;Detail Distortion Channel;8;0;Create;True;0;0;0;False;0;False;1,0,0,0;1,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.Vector4Node;86;-593.2379,-1899.328;Inherit;False;Property;_DetailMultiplyChannel;Detail Multiply Channel;10;0;Create;True;0;0;0;False;0;False;0,0,0,0;0,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.RangedFloatNode;108;-228.1713,-1713.338;Inherit;False;Constant;_Float0;Float 0;15;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.FunctionNode;154;153.6483,-2241.953;Inherit;False;Channel Picker;-1;;63;dc5f4cb24a8bdf448b40a1ec5866280e;0;2;5;FLOAT4;1,0,0,0;False;7;FLOAT4;0,0,0,1;False;1;FLOAT;0 Node;AmplifyShaderEditor.ScreenPosInputsNode;145;-2846.101,-404.1232;Float;False;0;False;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SimpleAddOpNode;102;408.6009,-362.8981;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.PannerNode;80;-391.8206,-2408.415;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 Node;AmplifyShaderEditor.FunctionNode;152;158.6752,-1380.28;Inherit;False;Channel Picker;-1;;64;dc5f4cb24a8bdf448b40a1ec5866280e;0;2;5;FLOAT4;1,0,0,0;False;7;FLOAT4;0,0,0,1;False;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;91;400.6483,-2501.953;Inherit;False;AdditiveNoise;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.PannerNode;22;-1683.138,-518.7701;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 Node;AmplifyShaderEditor.TexturePropertyNode;27;-1773.575,-855.0742;Inherit;True;Property;_MainTex;Main Texture;0;0;Create;False;0;0;0;False;0;False;None;None;False;white;Auto;Texture2D;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;151;-2072.593,-317.8097;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;4,4;False;1;FLOAT2;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;90;416.6483,-2215.953;Inherit;False;DistortionNoise;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;81;-631.819,-2456.415;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SamplerNode;79;-200.3228,-2353.517;Inherit;True;Property;_TextureSample3;Texture Sample 3;4;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;166;787.0098,-573.7703;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;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;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;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;168;787.0098,-573.7703;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;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;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;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;169;787.0098,-573.7703;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;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;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;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;;False;False;True;1;LightMode=DepthOnly;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;170;787.0098,-573.7703;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;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;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;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;171;787.0098,-573.7703;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;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;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;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;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=Universal2D;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;172;787.0098,-573.7703;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;SceneSelectionPass;0;6;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;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;173;787.0098,-573.7703;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ScenePickingPass;0;7;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;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;174;787.0098,-573.7703;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormals;0;8;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;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;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;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;175;787.0098,-573.7703;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormalsOnly;0;9;DepthNormalsOnly;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;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;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;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;True;9;d3d11;metal;vulkan;xboxone;xboxseries;playstation;ps4;ps5;switch;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;167;849.0098,-373.7703;Float;False;True;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;13;Piloto Studio/Screenspace Alpha;2992e84f91cbeb14eab234972e07ea9d;True;Forward;0;1;Forward;8;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;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Unlit;True;7;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;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForwardOnly;False;False;0;;0;0;Standard;22;Surface;1;638227592001332784; Blend;0;0;Two Sided;1;0;Forward Only;0;0;Cast Shadows;0;638227592131695825; Use Shadow Threshold;0;0;Receive Shadows;1;0;GPU Instancing;1;0;LOD CrossFade;0;0;Built-in Fog;0;0;Meta Pass;0;0;Extra Pre Pass;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,;0; Type;0;0; Tess;16,False,;0; Min;10,False,;0; Max;25,False,;0; Edge Length;16,False,;0; Max Displacement;25,False,;0;Vertex Position,InvertActionOnDeselection;1;0;0;10;False;True;False;True;False;False;True;True;True;False;False;;False;0 WireConnection;44;0;43;0 WireConnection;44;2;51;0 WireConnection;45;0;47;0 WireConnection;45;1;44;0 WireConnection;157;5;45;0 WireConnection;157;7;48;0 WireConnection;49;0;157;0 WireConnection;64;0;52;0 WireConnection;70;1;64;0 WireConnection;70;2;60;4 WireConnection;68;0;70;0 WireConnection;110;0;109;0 WireConnection;109;0;150;0 WireConnection;109;1;10;0 WireConnection;150;0;27;0 WireConnection;150;1;22;0 WireConnection;136;0;135;0 WireConnection;136;1;149;0 WireConnection;138;0;136;0 WireConnection;138;1;151;0 WireConnection;164;0;37;0 WireConnection;164;1;158;0 WireConnection;164;2;163;0 WireConnection;164;3;98;0 WireConnection;158;0;156;0 WireConnection;158;1;159;0 WireConnection;163;0;162;3 WireConnection;40;0;61;4 WireConnection;40;1;68;0 WireConnection;40;2;52;0 WireConnection;105;0;86;1 WireConnection;105;1;86;2 WireConnection;105;2;86;3 WireConnection;105;3;86;4 WireConnection;155;5;79;0 WireConnection;155;7;87;0 WireConnection;147;0;146;0 WireConnection;146;0;145;0 WireConnection;111;0;110;0 WireConnection;111;1;110;1 WireConnection;111;2;110;2 WireConnection;111;3;110;3 WireConnection;156;5;150;0 WireConnection;156;7;10;0 WireConnection;106;0;105;0 WireConnection;106;2;153;0 WireConnection;106;3;108;0 WireConnection;106;4;108;0 WireConnection;153;5;79;0 WireConnection;153;7;86;0 WireConnection;92;0;106;0 WireConnection;154;5;79;0 WireConnection;154;7;85;0 WireConnection;102;0;164;0 WireConnection;102;1;101;0 WireConnection;80;0;81;0 WireConnection;80;2;84;0 WireConnection;152;5;45;0 WireConnection;152;7;48;0 WireConnection;91;0;155;0 WireConnection;22;0;138;0 WireConnection;22;2;23;0 WireConnection;151;0;147;0 WireConnection;90;0;154;0 WireConnection;79;0;83;0 WireConnection;79;1;80;0 WireConnection;167;2;102;0 WireConnection;167;3;40;0 ASEEND*/ //CHKSM=21F1B0AD60D5967CDD59773ED9474EE8A608CAB9