Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Question Universal Render Pipeline - how to render a plaine in front of other Objects?

Discussion in 'Shader Graph' started by Easterday, Mar 2, 2021.

  1. Easterday

    Easterday

    Joined:
    Mar 17, 2015
    Posts:
    5
    Hi,

    we upgraded to the Universal Render Pipeline. I can't get a shader to work that renders in front of other objects even if it is slightly behind the other object. Think of a health-bar behind a rock or tree or something.

    I made a shader with the shader graph and changed this:
    "Queue" = "Overlay" and ZWrite On
    but it doesn't work. Does someone have an idea how to achive this? =/

    The code:
    Code (CSharp):
    1. Shader "sprite_ontop"
    2. {
    3.     Properties
    4.     {
    5.         [NoScaleOffset]Texture2D_C1A96A04("Texture2D", 2D) = "white" {}
    6.         [HideInInspector][NoScaleOffset]unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
    7.         [HideInInspector][NoScaleOffset]unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
    8.         [HideInInspector][NoScaleOffset]unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
    9.     }
    10.         SubShader
    11.     {
    12.         Tags
    13.         {
    14.             "RenderPipeline" = "UniversalPipeline"
    15.             "IgnoreProjector" = "True"
    16.             "RenderType" = "Transparent"
    17.             "UniversalMaterialType" = "Unlit"
    18.             "Queue" = "Overlay"
    19.         }
    20.         Pass
    21.         {
    22.             Name "Pass"
    23.             Tags
    24.             {
    25.         // LightMode: <None>
    26.     }
    27.  
    28.     // Render State
    29.     Cull Back
    30.     Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
    31.     ZTest LEqual
    32.     ZWrite On
    33.  
    34.         // Debug
    35.         // <None>
    36.  
    37.         // --------------------------------------------------
    38.         // Pass
    39.  
    40.         HLSLPROGRAM
    41.  
    42.         // Pragmas
    43.         #pragma target 2.0
    44.         #pragma only_renderers gles gles3 glcore
    45.         #pragma multi_compile_instancing
    46.         #pragma multi_compile_fog
    47.         #pragma vertex vert
    48.         #pragma fragment frag
    49.  
    50.         // DotsInstancingOptions: <None>
    51.         // HybridV1InjectedBuiltinProperties: <None>
    52.  
    53.         // Keywords
    54.         #pragma multi_compile _ LIGHTMAP_ON
    55.         #pragma multi_compile _ DIRLIGHTMAP_COMBINED
    56.         #pragma shader_feature _ _SAMPLE_GI
    57.         // GraphKeywords: <None>
    58.  
    59.         // Defines
    60.         #define _SURFACE_TYPE_TRANSPARENT 1
    61.         #define _AlphaClip 1
    62.         #define ATTRIBUTES_NEED_NORMAL
    63.         #define ATTRIBUTES_NEED_TANGENT
    64.         #define ATTRIBUTES_NEED_TEXCOORD0
    65.         #define VARYINGS_NEED_TEXCOORD0
    66.         #define FEATURES_GRAPH_VERTEX
    67.         /* WARNING: $splice Could not find named fragment 'PassInstancing' */
    68.         #define SHADERPASS SHADERPASS_UNLIT
    69.         /* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
    70.  
    71.         // Includes
    72.         #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
    73.         #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
    74.         #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
    75.         #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
    76.         #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
    77.  
    78.         // --------------------------------------------------
    79.         // Structs and Packing
    80.  
    81.         struct Attributes
    82.         {
    83.             float3 positionOS : POSITION;
    84.             float3 normalOS : NORMAL;
    85.             float4 tangentOS : TANGENT;
    86.             float4 uv0 : TEXCOORD0;
    87.             #if UNITY_ANY_INSTANCING_ENABLED
    88.             uint instanceID : INSTANCEID_SEMANTIC;
    89.             #endif
    90.         };
    91.         struct Varyings
    92.         {
    93.             float4 positionCS : SV_POSITION;
    94.             float4 texCoord0;
    95.             #if UNITY_ANY_INSTANCING_ENABLED
    96.             uint instanceID : CUSTOM_INSTANCE_ID;
    97.             #endif
    98.             #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    99.             uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
    100.             #endif
    101.             #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    102.             uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
    103.             #endif
    104.             #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    105.             FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
    106.             #endif
    107.         };
    108.         struct SurfaceDescriptionInputs
    109.         {
    110.             float4 uv0;
    111.         };
    112.         struct VertexDescriptionInputs
    113.         {
    114.             float3 ObjectSpaceNormal;
    115.             float3 ObjectSpaceTangent;
    116.             float3 ObjectSpacePosition;
    117.         };
    118.         struct PackedVaryings
    119.         {
    120.             float4 positionCS : SV_POSITION;
    121.             float4 interp0 : TEXCOORD0;
    122.             #if UNITY_ANY_INSTANCING_ENABLED
    123.             uint instanceID : CUSTOM_INSTANCE_ID;
    124.             #endif
    125.             #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    126.             uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
    127.             #endif
    128.             #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    129.             uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
    130.             #endif
    131.             #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    132.             FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
    133.             #endif
    134.         };
    135.  
    136.         PackedVaryings PackVaryings(Varyings input)
    137.         {
    138.             PackedVaryings output;
    139.             output.positionCS = input.positionCS;
    140.             output.interp0.xyzw = input.texCoord0;
    141.             #if UNITY_ANY_INSTANCING_ENABLED
    142.             output.instanceID = input.instanceID;
    143.             #endif
    144.             #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    145.             output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
    146.             #endif
    147.             #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    148.             output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
    149.             #endif
    150.             #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    151.             output.cullFace = input.cullFace;
    152.             #endif
    153.             return output;
    154.         }
    155.         Varyings UnpackVaryings(PackedVaryings input)
    156.         {
    157.             Varyings output;
    158.             output.positionCS = input.positionCS;
    159.             output.texCoord0 = input.interp0.xyzw;
    160.             #if UNITY_ANY_INSTANCING_ENABLED
    161.             output.instanceID = input.instanceID;
    162.             #endif
    163.             #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    164.             output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
    165.             #endif
    166.             #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    167.             output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
    168.             #endif
    169.             #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    170.             output.cullFace = input.cullFace;
    171.             #endif
    172.             return output;
    173.         }
    174.  
    175.         // --------------------------------------------------
    176.         // Graph
    177.  
    178.         // Graph Properties
    179.         CBUFFER_START(UnityPerMaterial)
    180.         float4 Texture2D_C1A96A04_TexelSize;
    181.         CBUFFER_END
    182.  
    183.             // Object and Global properties
    184.             TEXTURE2D(Texture2D_C1A96A04);
    185.             SAMPLER(samplerTexture2D_C1A96A04);
    186.             SAMPLER(_SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_Sampler_3_Linear_Repeat);
    187.  
    188.             // Graph Functions
    189.             // GraphFunctions: <None>
    190.  
    191.             // Graph Vertex
    192.             struct VertexDescription
    193.             {
    194.                 float3 Position;
    195.                 float3 Normal;
    196.                 float3 Tangent;
    197.             };
    198.  
    199.             VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
    200.             {
    201.                 VertexDescription description = (VertexDescription)0;
    202.                 description.Position = IN.ObjectSpacePosition;
    203.                 description.Normal = IN.ObjectSpaceNormal;
    204.                 description.Tangent = IN.ObjectSpaceTangent;
    205.                 return description;
    206.             }
    207.  
    208.             // Graph Pixel
    209.             struct SurfaceDescription
    210.             {
    211.                 float3 BaseColor;
    212.                 float Alpha;
    213.                 float AlphaClipThreshold;
    214.             };
    215.  
    216.             SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
    217.             {
    218.                 SurfaceDescription surface = (SurfaceDescription)0;
    219.                 float4 _UV_ed350dedd8d83a8d97dc982bbc0ad788_Out_0 = IN.uv0;
    220.                 float4 _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0 = SAMPLE_TEXTURE2D(Texture2D_C1A96A04, samplerTexture2D_C1A96A04, (_UV_ed350dedd8d83a8d97dc982bbc0ad788_Out_0.xy));
    221.                 float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_R_4 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.r;
    222.                 float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_G_5 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.g;
    223.                 float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_B_6 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.b;
    224.                 float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_A_7 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.a;
    225.                 surface.BaseColor = (_SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.xyz);
    226.                 surface.Alpha = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_A_7;
    227.                 surface.AlphaClipThreshold = 0;
    228.                 return surface;
    229.             }
    230.  
    231.             // --------------------------------------------------
    232.             // Build Graph Inputs
    233.  
    234.             VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
    235.             {
    236.                 VertexDescriptionInputs output;
    237.                 ZERO_INITIALIZE(VertexDescriptionInputs, output);
    238.  
    239.                 output.ObjectSpaceNormal = input.normalOS;
    240.                 output.ObjectSpaceTangent = input.tangentOS;
    241.                 output.ObjectSpacePosition = input.positionOS;
    242.  
    243.                 return output;
    244.             }
    245.  
    246.             SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
    247.             {
    248.                 SurfaceDescriptionInputs output;
    249.                 ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
    250.  
    251.  
    252.  
    253.  
    254.  
    255.                 output.uv0 = input.texCoord0;
    256.             #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    257.             #define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign =                    IS_FRONT_VFACE(input.cullFace, true, false);
    258.             #else
    259.             #define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
    260.             #endif
    261.             #undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
    262.  
    263.                 return output;
    264.             }
    265.  
    266.  
    267.             // --------------------------------------------------
    268.             // Main
    269.  
    270.             #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
    271.             #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
    272.             #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/UnlitPass.hlsl"
    273.  
    274.             ENDHLSL
    275.         }
    276.         Pass
    277.         {
    278.             Name "ShadowCaster"
    279.             Tags
    280.             {
    281.                 "LightMode" = "ShadowCaster"
    282.             }
    283.  
    284.                 // Render State
    285.                 Cull Back
    286.                 Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
    287.                 ZTest LEqual
    288.                 ZWrite On
    289.                 ColorMask 0
    290.  
    291.                 // Debug
    292.                 // <None>
    293.  
    294.                 // --------------------------------------------------
    295.                 // Pass
    296.  
    297.                 HLSLPROGRAM
    298.  
    299.                 // Pragmas
    300.                 #pragma target 2.0
    301.                 #pragma only_renderers gles gles3 glcore
    302.                 #pragma multi_compile_instancing
    303.                 #pragma vertex vert
    304.                 #pragma fragment frag
    305.  
    306.                 // DotsInstancingOptions: <None>
    307.                 // HybridV1InjectedBuiltinProperties: <None>
    308.  
    309.                 // Keywords
    310.                 // PassKeywords: <None>
    311.                 // GraphKeywords: <None>
    312.  
    313.                 // Defines
    314.                 #define _SURFACE_TYPE_TRANSPARENT 1
    315.                 #define _AlphaClip 1
    316.                 #define ATTRIBUTES_NEED_NORMAL
    317.                 #define ATTRIBUTES_NEED_TANGENT
    318.                 #define ATTRIBUTES_NEED_TEXCOORD0
    319.                 #define VARYINGS_NEED_TEXCOORD0
    320.                 #define FEATURES_GRAPH_VERTEX
    321.                 /* WARNING: $splice Could not find named fragment 'PassInstancing' */
    322.                 #define SHADERPASS SHADERPASS_SHADOWCASTER
    323.                 /* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
    324.  
    325.                 // Includes
    326.                 #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
    327.                 #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
    328.                 #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
    329.                 #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
    330.                 #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
    331.  
    332.                 // --------------------------------------------------
    333.                 // Structs and Packing
    334.  
    335.                 struct Attributes
    336.                 {
    337.                     float3 positionOS : POSITION;
    338.                     float3 normalOS : NORMAL;
    339.                     float4 tangentOS : TANGENT;
    340.                     float4 uv0 : TEXCOORD0;
    341.                     #if UNITY_ANY_INSTANCING_ENABLED
    342.                     uint instanceID : INSTANCEID_SEMANTIC;
    343.                     #endif
    344.                 };
    345.                 struct Varyings
    346.                 {
    347.                     float4 positionCS : SV_POSITION;
    348.                     float4 texCoord0;
    349.                     #if UNITY_ANY_INSTANCING_ENABLED
    350.                     uint instanceID : CUSTOM_INSTANCE_ID;
    351.                     #endif
    352.                     #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    353.                     uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
    354.                     #endif
    355.                     #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    356.                     uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
    357.                     #endif
    358.                     #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    359.                     FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
    360.                     #endif
    361.                 };
    362.                 struct SurfaceDescriptionInputs
    363.                 {
    364.                     float4 uv0;
    365.                 };
    366.                 struct VertexDescriptionInputs
    367.                 {
    368.                     float3 ObjectSpaceNormal;
    369.                     float3 ObjectSpaceTangent;
    370.                     float3 ObjectSpacePosition;
    371.                 };
    372.                 struct PackedVaryings
    373.                 {
    374.                     float4 positionCS : SV_POSITION;
    375.                     float4 interp0 : TEXCOORD0;
    376.                     #if UNITY_ANY_INSTANCING_ENABLED
    377.                     uint instanceID : CUSTOM_INSTANCE_ID;
    378.                     #endif
    379.                     #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    380.                     uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
    381.                     #endif
    382.                     #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    383.                     uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
    384.                     #endif
    385.                     #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    386.                     FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
    387.                     #endif
    388.                 };
    389.  
    390.                 PackedVaryings PackVaryings(Varyings input)
    391.                 {
    392.                     PackedVaryings output;
    393.                     output.positionCS = input.positionCS;
    394.                     output.interp0.xyzw = input.texCoord0;
    395.                     #if UNITY_ANY_INSTANCING_ENABLED
    396.                     output.instanceID = input.instanceID;
    397.                     #endif
    398.                     #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    399.                     output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
    400.                     #endif
    401.                     #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    402.                     output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
    403.                     #endif
    404.                     #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    405.                     output.cullFace = input.cullFace;
    406.                     #endif
    407.                     return output;
    408.                 }
    409.                 Varyings UnpackVaryings(PackedVaryings input)
    410.                 {
    411.                     Varyings output;
    412.                     output.positionCS = input.positionCS;
    413.                     output.texCoord0 = input.interp0.xyzw;
    414.                     #if UNITY_ANY_INSTANCING_ENABLED
    415.                     output.instanceID = input.instanceID;
    416.                     #endif
    417.                     #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    418.                     output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
    419.                     #endif
    420.                     #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    421.                     output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
    422.                     #endif
    423.                     #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    424.                     output.cullFace = input.cullFace;
    425.                     #endif
    426.                     return output;
    427.                 }
    428.  
    429.                 // --------------------------------------------------
    430.                 // Graph
    431.  
    432.                 // Graph Properties
    433.                 CBUFFER_START(UnityPerMaterial)
    434.                 float4 Texture2D_C1A96A04_TexelSize;
    435.                 CBUFFER_END
    436.  
    437.                     // Object and Global properties
    438.                     TEXTURE2D(Texture2D_C1A96A04);
    439.                     SAMPLER(samplerTexture2D_C1A96A04);
    440.                     SAMPLER(_SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_Sampler_3_Linear_Repeat);
    441.  
    442.                     // Graph Functions
    443.                     // GraphFunctions: <None>
    444.  
    445.                     // Graph Vertex
    446.                     struct VertexDescription
    447.                     {
    448.                         float3 Position;
    449.                         float3 Normal;
    450.                         float3 Tangent;
    451.                     };
    452.  
    453.                     VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
    454.                     {
    455.                         VertexDescription description = (VertexDescription)0;
    456.                         description.Position = IN.ObjectSpacePosition;
    457.                         description.Normal = IN.ObjectSpaceNormal;
    458.                         description.Tangent = IN.ObjectSpaceTangent;
    459.                         return description;
    460.                     }
    461.  
    462.                     // Graph Pixel
    463.                     struct SurfaceDescription
    464.                     {
    465.                         float Alpha;
    466.                         float AlphaClipThreshold;
    467.                     };
    468.  
    469.                     SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
    470.                     {
    471.                         SurfaceDescription surface = (SurfaceDescription)0;
    472.                         float4 _UV_ed350dedd8d83a8d97dc982bbc0ad788_Out_0 = IN.uv0;
    473.                         float4 _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0 = SAMPLE_TEXTURE2D(Texture2D_C1A96A04, samplerTexture2D_C1A96A04, (_UV_ed350dedd8d83a8d97dc982bbc0ad788_Out_0.xy));
    474.                         float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_R_4 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.r;
    475.                         float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_G_5 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.g;
    476.                         float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_B_6 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.b;
    477.                         float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_A_7 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.a;
    478.                         surface.Alpha = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_A_7;
    479.                         surface.AlphaClipThreshold = 0;
    480.                         return surface;
    481.                     }
    482.  
    483.                     // --------------------------------------------------
    484.                     // Build Graph Inputs
    485.  
    486.                     VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
    487.                     {
    488.                         VertexDescriptionInputs output;
    489.                         ZERO_INITIALIZE(VertexDescriptionInputs, output);
    490.  
    491.                         output.ObjectSpaceNormal = input.normalOS;
    492.                         output.ObjectSpaceTangent = input.tangentOS;
    493.                         output.ObjectSpacePosition = input.positionOS;
    494.  
    495.                         return output;
    496.                     }
    497.  
    498.                     SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
    499.                     {
    500.                         SurfaceDescriptionInputs output;
    501.                         ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
    502.  
    503.  
    504.  
    505.  
    506.  
    507.                         output.uv0 = input.texCoord0;
    508.                     #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    509.                     #define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign =                    IS_FRONT_VFACE(input.cullFace, true, false);
    510.                     #else
    511.                     #define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
    512.                     #endif
    513.                     #undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
    514.  
    515.                         return output;
    516.                     }
    517.  
    518.  
    519.                     // --------------------------------------------------
    520.                     // Main
    521.  
    522.                     #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
    523.                     #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
    524.                     #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShadowCasterPass.hlsl"
    525.  
    526.                     ENDHLSL
    527.                 }
    528.                 Pass
    529.                 {
    530.                     Name "DepthOnly"
    531.                     Tags
    532.                     {
    533.                         "LightMode" = "DepthOnly"
    534.                     }
    535.  
    536.                         // Render State
    537.                         Cull Back
    538.                         Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
    539.                         ZTest LEqual
    540.                         ZWrite On
    541.                         ColorMask 0
    542.  
    543.                         // Debug
    544.                         // <None>
    545.  
    546.                         // --------------------------------------------------
    547.                         // Pass
    548.  
    549.                         HLSLPROGRAM
    550.  
    551.                         // Pragmas
    552.                         #pragma target 2.0
    553.                         #pragma only_renderers gles gles3 glcore
    554.                         #pragma multi_compile_instancing
    555.                         #pragma vertex vert
    556.                         #pragma fragment frag
    557.  
    558.                         // DotsInstancingOptions: <None>
    559.                         // HybridV1InjectedBuiltinProperties: <None>
    560.  
    561.                         // Keywords
    562.                         // PassKeywords: <None>
    563.                         // GraphKeywords: <None>
    564.  
    565.                         // Defines
    566.                         #define _SURFACE_TYPE_TRANSPARENT 1
    567.                         #define _AlphaClip 1
    568.                         #define ATTRIBUTES_NEED_NORMAL
    569.                         #define ATTRIBUTES_NEED_TANGENT
    570.                         #define ATTRIBUTES_NEED_TEXCOORD0
    571.                         #define VARYINGS_NEED_TEXCOORD0
    572.                         #define FEATURES_GRAPH_VERTEX
    573.                         /* WARNING: $splice Could not find named fragment 'PassInstancing' */
    574.                         #define SHADERPASS SHADERPASS_DEPTHONLY
    575.                         /* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
    576.  
    577.                         // Includes
    578.                         #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
    579.                         #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
    580.                         #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
    581.                         #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
    582.                         #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
    583.  
    584.                         // --------------------------------------------------
    585.                         // Structs and Packing
    586.  
    587.                         struct Attributes
    588.                         {
    589.                             float3 positionOS : POSITION;
    590.                             float3 normalOS : NORMAL;
    591.                             float4 tangentOS : TANGENT;
    592.                             float4 uv0 : TEXCOORD0;
    593.                             #if UNITY_ANY_INSTANCING_ENABLED
    594.                             uint instanceID : INSTANCEID_SEMANTIC;
    595.                             #endif
    596.                         };
    597.                         struct Varyings
    598.                         {
    599.                             float4 positionCS : SV_POSITION;
    600.                             float4 texCoord0;
    601.                             #if UNITY_ANY_INSTANCING_ENABLED
    602.                             uint instanceID : CUSTOM_INSTANCE_ID;
    603.                             #endif
    604.                             #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    605.                             uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
    606.                             #endif
    607.                             #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    608.                             uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
    609.                             #endif
    610.                             #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    611.                             FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
    612.                             #endif
    613.                         };
    614.                         struct SurfaceDescriptionInputs
    615.                         {
    616.                             float4 uv0;
    617.                         };
    618.                         struct VertexDescriptionInputs
    619.                         {
    620.                             float3 ObjectSpaceNormal;
    621.                             float3 ObjectSpaceTangent;
    622.                             float3 ObjectSpacePosition;
    623.                         };
    624.                         struct PackedVaryings
    625.                         {
    626.                             float4 positionCS : SV_POSITION;
    627.                             float4 interp0 : TEXCOORD0;
    628.                             #if UNITY_ANY_INSTANCING_ENABLED
    629.                             uint instanceID : CUSTOM_INSTANCE_ID;
    630.                             #endif
    631.                             #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    632.                             uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
    633.                             #endif
    634.                             #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    635.                             uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
    636.                             #endif
    637.                             #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    638.                             FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
    639.                             #endif
    640.                         };
    641.  
    642.                         PackedVaryings PackVaryings(Varyings input)
    643.                         {
    644.                             PackedVaryings output;
    645.                             output.positionCS = input.positionCS;
    646.                             output.interp0.xyzw = input.texCoord0;
    647.                             #if UNITY_ANY_INSTANCING_ENABLED
    648.                             output.instanceID = input.instanceID;
    649.                             #endif
    650.                             #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    651.                             output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
    652.                             #endif
    653.                             #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    654.                             output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
    655.                             #endif
    656.                             #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    657.                             output.cullFace = input.cullFace;
    658.                             #endif
    659.                             return output;
    660.                         }
    661.                         Varyings UnpackVaryings(PackedVaryings input)
    662.                         {
    663.                             Varyings output;
    664.                             output.positionCS = input.positionCS;
    665.                             output.texCoord0 = input.interp0.xyzw;
    666.                             #if UNITY_ANY_INSTANCING_ENABLED
    667.                             output.instanceID = input.instanceID;
    668.                             #endif
    669.                             #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    670.                             output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
    671.                             #endif
    672.                             #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    673.                             output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
    674.                             #endif
    675.                             #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    676.                             output.cullFace = input.cullFace;
    677.                             #endif
    678.                             return output;
    679.                         }
    680.  
    681.                         // --------------------------------------------------
    682.                         // Graph
    683.  
    684.                         // Graph Properties
    685.                         CBUFFER_START(UnityPerMaterial)
    686.                         float4 Texture2D_C1A96A04_TexelSize;
    687.                         CBUFFER_END
    688.  
    689.                             // Object and Global properties
    690.                             TEXTURE2D(Texture2D_C1A96A04);
    691.                             SAMPLER(samplerTexture2D_C1A96A04);
    692.                             SAMPLER(_SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_Sampler_3_Linear_Repeat);
    693.  
    694.                             // Graph Functions
    695.                             // GraphFunctions: <None>
    696.  
    697.                             // Graph Vertex
    698.                             struct VertexDescription
    699.                             {
    700.                                 float3 Position;
    701.                                 float3 Normal;
    702.                                 float3 Tangent;
    703.                             };
    704.  
    705.                             VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
    706.                             {
    707.                                 VertexDescription description = (VertexDescription)0;
    708.                                 description.Position = IN.ObjectSpacePosition;
    709.                                 description.Normal = IN.ObjectSpaceNormal;
    710.                                 description.Tangent = IN.ObjectSpaceTangent;
    711.                                 return description;
    712.                             }
    713.  
    714.                             // Graph Pixel
    715.                             struct SurfaceDescription
    716.                             {
    717.                                 float Alpha;
    718.                                 float AlphaClipThreshold;
    719.                             };
    720.  
    721.                             SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
    722.                             {
    723.                                 SurfaceDescription surface = (SurfaceDescription)0;
    724.                                 float4 _UV_ed350dedd8d83a8d97dc982bbc0ad788_Out_0 = IN.uv0;
    725.                                 float4 _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0 = SAMPLE_TEXTURE2D(Texture2D_C1A96A04, samplerTexture2D_C1A96A04, (_UV_ed350dedd8d83a8d97dc982bbc0ad788_Out_0.xy));
    726.                                 float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_R_4 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.r;
    727.                                 float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_G_5 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.g;
    728.                                 float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_B_6 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.b;
    729.                                 float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_A_7 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.a;
    730.                                 surface.Alpha = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_A_7;
    731.                                 surface.AlphaClipThreshold = 0;
    732.                                 return surface;
    733.                             }
    734.  
    735.                             // --------------------------------------------------
    736.                             // Build Graph Inputs
    737.  
    738.                             VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
    739.                             {
    740.                                 VertexDescriptionInputs output;
    741.                                 ZERO_INITIALIZE(VertexDescriptionInputs, output);
    742.  
    743.                                 output.ObjectSpaceNormal = input.normalOS;
    744.                                 output.ObjectSpaceTangent = input.tangentOS;
    745.                                 output.ObjectSpacePosition = input.positionOS;
    746.  
    747.                                 return output;
    748.                             }
    749.  
    750.                             SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
    751.                             {
    752.                                 SurfaceDescriptionInputs output;
    753.                                 ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
    754.  
    755.  
    756.  
    757.  
    758.  
    759.                                 output.uv0 = input.texCoord0;
    760.                             #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    761.                             #define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign =                    IS_FRONT_VFACE(input.cullFace, true, false);
    762.                             #else
    763.                             #define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
    764.                             #endif
    765.                             #undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
    766.  
    767.                                 return output;
    768.                             }
    769.  
    770.  
    771.                             // --------------------------------------------------
    772.                             // Main
    773.  
    774.                             #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
    775.                             #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
    776.                             #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/DepthOnlyPass.hlsl"
    777.  
    778.                             ENDHLSL
    779.                         }
    780.     }
    781.         SubShader
    782.                             {
    783.                                 Tags
    784.                                 {
    785.                                     "RenderPipeline" = "UniversalPipeline"
    786.                                     "RenderType" = "Transparent"
    787.                                     "UniversalMaterialType" = "Unlit"
    788.                                     "Queue" = "Transparent"
    789.                                 }
    790.                                 Pass
    791.                                 {
    792.                                     Name "Pass"
    793.                                     Tags
    794.                                     {
    795.                                 // LightMode: <None>
    796.                             }
    797.  
    798.                             // Render State
    799.                             Cull Back
    800.                             Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
    801.                             ZTest LEqual
    802.                             ZWrite Off
    803.  
    804.                                 // Debug
    805.                                 // <None>
    806.  
    807.                                 // --------------------------------------------------
    808.                                 // Pass
    809.  
    810.                                 HLSLPROGRAM
    811.  
    812.                                 // Pragmas
    813.                                 #pragma target 4.5
    814.                                 #pragma exclude_renderers gles gles3 glcore
    815.                                 #pragma multi_compile_instancing
    816.                                 #pragma multi_compile_fog
    817.                                 #pragma multi_compile _ DOTS_INSTANCING_ON
    818.                                 #pragma vertex vert
    819.                                 #pragma fragment frag
    820.  
    821.                                 // DotsInstancingOptions: <None>
    822.                                 // HybridV1InjectedBuiltinProperties: <None>
    823.  
    824.                                 // Keywords
    825.                                 #pragma multi_compile _ LIGHTMAP_ON
    826.                                 #pragma multi_compile _ DIRLIGHTMAP_COMBINED
    827.                                 #pragma shader_feature _ _SAMPLE_GI
    828.                                 // GraphKeywords: <None>
    829.  
    830.                                 // Defines
    831.                                 #define _SURFACE_TYPE_TRANSPARENT 1
    832.                                 #define _AlphaClip 1
    833.                                 #define ATTRIBUTES_NEED_NORMAL
    834.                                 #define ATTRIBUTES_NEED_TANGENT
    835.                                 #define ATTRIBUTES_NEED_TEXCOORD0
    836.                                 #define VARYINGS_NEED_TEXCOORD0
    837.                                 #define FEATURES_GRAPH_VERTEX
    838.                                 /* WARNING: $splice Could not find named fragment 'PassInstancing' */
    839.                                 #define SHADERPASS SHADERPASS_UNLIT
    840.                                 /* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
    841.  
    842.                                 // Includes
    843.                                 #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
    844.                                 #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
    845.                                 #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
    846.                                 #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
    847.                                 #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
    848.  
    849.                                 // --------------------------------------------------
    850.                                 // Structs and Packing
    851.  
    852.                                 struct Attributes
    853.                                 {
    854.                                     float3 positionOS : POSITION;
    855.                                     float3 normalOS : NORMAL;
    856.                                     float4 tangentOS : TANGENT;
    857.                                     float4 uv0 : TEXCOORD0;
    858.                                     #if UNITY_ANY_INSTANCING_ENABLED
    859.                                     uint instanceID : INSTANCEID_SEMANTIC;
    860.                                     #endif
    861.                                 };
    862.                                 struct Varyings
    863.                                 {
    864.                                     float4 positionCS : SV_POSITION;
    865.                                     float4 texCoord0;
    866.                                     #if UNITY_ANY_INSTANCING_ENABLED
    867.                                     uint instanceID : CUSTOM_INSTANCE_ID;
    868.                                     #endif
    869.                                     #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    870.                                     uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
    871.                                     #endif
    872.                                     #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    873.                                     uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
    874.                                     #endif
    875.                                     #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    876.                                     FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
    877.                                     #endif
    878.                                 };
    879.                                 struct SurfaceDescriptionInputs
    880.                                 {
    881.                                     float4 uv0;
    882.                                 };
    883.                                 struct VertexDescriptionInputs
    884.                                 {
    885.                                     float3 ObjectSpaceNormal;
    886.                                     float3 ObjectSpaceTangent;
    887.                                     float3 ObjectSpacePosition;
    888.                                 };
    889.                                 struct PackedVaryings
    890.                                 {
    891.                                     float4 positionCS : SV_POSITION;
    892.                                     float4 interp0 : TEXCOORD0;
    893.                                     #if UNITY_ANY_INSTANCING_ENABLED
    894.                                     uint instanceID : CUSTOM_INSTANCE_ID;
    895.                                     #endif
    896.                                     #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    897.                                     uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
    898.                                     #endif
    899.                                     #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    900.                                     uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
    901.                                     #endif
    902.                                     #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    903.                                     FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
    904.                                     #endif
    905.                                 };
    906.  
    907.                                 PackedVaryings PackVaryings(Varyings input)
    908.                                 {
    909.                                     PackedVaryings output;
    910.                                     output.positionCS = input.positionCS;
    911.                                     output.interp0.xyzw = input.texCoord0;
    912.                                     #if UNITY_ANY_INSTANCING_ENABLED
    913.                                     output.instanceID = input.instanceID;
    914.                                     #endif
    915.                                     #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    916.                                     output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
    917.                                     #endif
    918.                                     #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    919.                                     output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
    920.                                     #endif
    921.                                     #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    922.                                     output.cullFace = input.cullFace;
    923.                                     #endif
    924.                                     return output;
    925.                                 }
    926.                                 Varyings UnpackVaryings(PackedVaryings input)
    927.                                 {
    928.                                     Varyings output;
    929.                                     output.positionCS = input.positionCS;
    930.                                     output.texCoord0 = input.interp0.xyzw;
    931.                                     #if UNITY_ANY_INSTANCING_ENABLED
    932.                                     output.instanceID = input.instanceID;
    933.                                     #endif
    934.                                     #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    935.                                     output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
    936.                                     #endif
    937.                                     #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    938.                                     output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
    939.                                     #endif
    940.                                     #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    941.                                     output.cullFace = input.cullFace;
    942.                                     #endif
    943.                                     return output;
    944.                                 }
    945.  
    946.                                 // --------------------------------------------------
    947.                                 // Graph
    948.  
    949.                                 // Graph Properties
    950.                                 CBUFFER_START(UnityPerMaterial)
    951.                                 float4 Texture2D_C1A96A04_TexelSize;
    952.                                 CBUFFER_END
    953.  
    954.                                     // Object and Global properties
    955.                                     TEXTURE2D(Texture2D_C1A96A04);
    956.                                     SAMPLER(samplerTexture2D_C1A96A04);
    957.                                     SAMPLER(_SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_Sampler_3_Linear_Repeat);
    958.  
    959.                                     // Graph Functions
    960.                                     // GraphFunctions: <None>
    961.  
    962.                                     // Graph Vertex
    963.                                     struct VertexDescription
    964.                                     {
    965.                                         float3 Position;
    966.                                         float3 Normal;
    967.                                         float3 Tangent;
    968.                                     };
    969.  
    970.                                     VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
    971.                                     {
    972.                                         VertexDescription description = (VertexDescription)0;
    973.                                         description.Position = IN.ObjectSpacePosition;
    974.                                         description.Normal = IN.ObjectSpaceNormal;
    975.                                         description.Tangent = IN.ObjectSpaceTangent;
    976.                                         return description;
    977.                                     }
    978.  
    979.                                     // Graph Pixel
    980.                                     struct SurfaceDescription
    981.                                     {
    982.                                         float3 BaseColor;
    983.                                         float Alpha;
    984.                                         float AlphaClipThreshold;
    985.                                     };
    986.  
    987.                                     SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
    988.                                     {
    989.                                         SurfaceDescription surface = (SurfaceDescription)0;
    990.                                         float4 _UV_ed350dedd8d83a8d97dc982bbc0ad788_Out_0 = IN.uv0;
    991.                                         float4 _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0 = SAMPLE_TEXTURE2D(Texture2D_C1A96A04, samplerTexture2D_C1A96A04, (_UV_ed350dedd8d83a8d97dc982bbc0ad788_Out_0.xy));
    992.                                         float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_R_4 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.r;
    993.                                         float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_G_5 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.g;
    994.                                         float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_B_6 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.b;
    995.                                         float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_A_7 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.a;
    996.                                         surface.BaseColor = (_SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.xyz);
    997.                                         surface.Alpha = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_A_7;
    998.                                         surface.AlphaClipThreshold = 0;
    999.                                         return surface;
    1000.                                     }
    1001.  
    1002.                                     // --------------------------------------------------
    1003.                                     // Build Graph Inputs
    1004.  
    1005.                                     VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
    1006.                                     {
    1007.                                         VertexDescriptionInputs output;
    1008.                                         ZERO_INITIALIZE(VertexDescriptionInputs, output);
    1009.  
    1010.                                         output.ObjectSpaceNormal = input.normalOS;
    1011.                                         output.ObjectSpaceTangent = input.tangentOS;
    1012.                                         output.ObjectSpacePosition = input.positionOS;
    1013.  
    1014.                                         return output;
    1015.                                     }
    1016.  
    1017.                                     SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
    1018.                                     {
    1019.                                         SurfaceDescriptionInputs output;
    1020.                                         ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
    1021.  
    1022.  
    1023.  
    1024.  
    1025.  
    1026.                                         output.uv0 = input.texCoord0;
    1027.                                     #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    1028.                                     #define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign =                    IS_FRONT_VFACE(input.cullFace, true, false);
    1029.                                     #else
    1030.                                     #define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
    1031.                                     #endif
    1032.                                     #undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
    1033.  
    1034.                                         return output;
    1035.                                     }
    1036.  
    1037.  
    1038.                                     // --------------------------------------------------
    1039.                                     // Main
    1040.  
    1041.                                     #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
    1042.                                     #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
    1043.                                     #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/UnlitPass.hlsl"
    1044.  
    1045.                                     ENDHLSL
    1046.                                 }
    1047.                                 Pass
    1048.                                 {
    1049.                                     Name "ShadowCaster"
    1050.                                     Tags
    1051.                                     {
    1052.                                         "LightMode" = "ShadowCaster"
    1053.                                     }
    1054.  
    1055.                                         // Render State
    1056.                                         Cull Back
    1057.                                         Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
    1058.                                         ZTest LEqual
    1059.                                         ZWrite On
    1060.                                         ColorMask 0
    1061.  
    1062.                                         // Debug
    1063.                                         // <None>
    1064.  
    1065.                                         // --------------------------------------------------
    1066.                                         // Pass
    1067.  
    1068.                                         HLSLPROGRAM
    1069.  
    1070.                                         // Pragmas
    1071.                                         #pragma target 4.5
    1072.                                         #pragma exclude_renderers gles gles3 glcore
    1073.                                         #pragma multi_compile_instancing
    1074.                                         #pragma multi_compile _ DOTS_INSTANCING_ON
    1075.                                         #pragma vertex vert
    1076.                                         #pragma fragment frag
    1077.  
    1078.                                         // DotsInstancingOptions: <None>
    1079.                                         // HybridV1InjectedBuiltinProperties: <None>
    1080.  
    1081.                                         // Keywords
    1082.                                         // PassKeywords: <None>
    1083.                                         // GraphKeywords: <None>
    1084.  
    1085.                                         // Defines
    1086.                                         #define _SURFACE_TYPE_TRANSPARENT 1
    1087.                                         #define _AlphaClip 1
    1088.                                         #define ATTRIBUTES_NEED_NORMAL
    1089.                                         #define ATTRIBUTES_NEED_TANGENT
    1090.                                         #define ATTRIBUTES_NEED_TEXCOORD0
    1091.                                         #define VARYINGS_NEED_TEXCOORD0
    1092.                                         #define FEATURES_GRAPH_VERTEX
    1093.                                         /* WARNING: $splice Could not find named fragment 'PassInstancing' */
    1094.                                         #define SHADERPASS SHADERPASS_SHADOWCASTER
    1095.                                         /* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
    1096.  
    1097.                                         // Includes
    1098.                                         #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
    1099.                                         #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
    1100.                                         #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
    1101.                                         #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
    1102.                                         #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
    1103.  
    1104.                                         // --------------------------------------------------
    1105.                                         // Structs and Packing
    1106.  
    1107.                                         struct Attributes
    1108.                                         {
    1109.                                             float3 positionOS : POSITION;
    1110.                                             float3 normalOS : NORMAL;
    1111.                                             float4 tangentOS : TANGENT;
    1112.                                             float4 uv0 : TEXCOORD0;
    1113.                                             #if UNITY_ANY_INSTANCING_ENABLED
    1114.                                             uint instanceID : INSTANCEID_SEMANTIC;
    1115.                                             #endif
    1116.                                         };
    1117.                                         struct Varyings
    1118.                                         {
    1119.                                             float4 positionCS : SV_POSITION;
    1120.                                             float4 texCoord0;
    1121.                                             #if UNITY_ANY_INSTANCING_ENABLED
    1122.                                             uint instanceID : CUSTOM_INSTANCE_ID;
    1123.                                             #endif
    1124.                                             #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    1125.                                             uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
    1126.                                             #endif
    1127.                                             #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    1128.                                             uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
    1129.                                             #endif
    1130.                                             #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    1131.                                             FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
    1132.                                             #endif
    1133.                                         };
    1134.                                         struct SurfaceDescriptionInputs
    1135.                                         {
    1136.                                             float4 uv0;
    1137.                                         };
    1138.                                         struct VertexDescriptionInputs
    1139.                                         {
    1140.                                             float3 ObjectSpaceNormal;
    1141.                                             float3 ObjectSpaceTangent;
    1142.                                             float3 ObjectSpacePosition;
    1143.                                         };
    1144.                                         struct PackedVaryings
    1145.                                         {
    1146.                                             float4 positionCS : SV_POSITION;
    1147.                                             float4 interp0 : TEXCOORD0;
    1148.                                             #if UNITY_ANY_INSTANCING_ENABLED
    1149.                                             uint instanceID : CUSTOM_INSTANCE_ID;
    1150.                                             #endif
    1151.                                             #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    1152.                                             uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
    1153.                                             #endif
    1154.                                             #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    1155.                                             uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
    1156.                                             #endif
    1157.                                             #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    1158.                                             FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
    1159.                                             #endif
    1160.                                         };
    1161.  
    1162.                                         PackedVaryings PackVaryings(Varyings input)
    1163.                                         {
    1164.                                             PackedVaryings output;
    1165.                                             output.positionCS = input.positionCS;
    1166.                                             output.interp0.xyzw = input.texCoord0;
    1167.                                             #if UNITY_ANY_INSTANCING_ENABLED
    1168.                                             output.instanceID = input.instanceID;
    1169.                                             #endif
    1170.                                             #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    1171.                                             output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
    1172.                                             #endif
    1173.                                             #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    1174.                                             output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
    1175.                                             #endif
    1176.                                             #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    1177.                                             output.cullFace = input.cullFace;
    1178.                                             #endif
    1179.                                             return output;
    1180.                                         }
    1181.                                         Varyings UnpackVaryings(PackedVaryings input)
    1182.                                         {
    1183.                                             Varyings output;
    1184.                                             output.positionCS = input.positionCS;
    1185.                                             output.texCoord0 = input.interp0.xyzw;
    1186.                                             #if UNITY_ANY_INSTANCING_ENABLED
    1187.                                             output.instanceID = input.instanceID;
    1188.                                             #endif
    1189.                                             #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    1190.                                             output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
    1191.                                             #endif
    1192.                                             #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    1193.                                             output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
    1194.                                             #endif
    1195.                                             #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    1196.                                             output.cullFace = input.cullFace;
    1197.                                             #endif
    1198.                                             return output;
    1199.                                         }
    1200.  
    1201.                                         // --------------------------------------------------
    1202.                                         // Graph
    1203.  
    1204.                                         // Graph Properties
    1205.                                         CBUFFER_START(UnityPerMaterial)
    1206.                                         float4 Texture2D_C1A96A04_TexelSize;
    1207.                                         CBUFFER_END
    1208.  
    1209.                                             // Object and Global properties
    1210.                                             TEXTURE2D(Texture2D_C1A96A04);
    1211.                                             SAMPLER(samplerTexture2D_C1A96A04);
    1212.                                             SAMPLER(_SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_Sampler_3_Linear_Repeat);
    1213.  
    1214.                                             // Graph Functions
    1215.                                             // GraphFunctions: <None>
    1216.  
    1217.                                             // Graph Vertex
    1218.                                             struct VertexDescription
    1219.                                             {
    1220.                                                 float3 Position;
    1221.                                                 float3 Normal;
    1222.                                                 float3 Tangent;
    1223.                                             };
    1224.  
    1225.                                             VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
    1226.                                             {
    1227.                                                 VertexDescription description = (VertexDescription)0;
    1228.                                                 description.Position = IN.ObjectSpacePosition;
    1229.                                                 description.Normal = IN.ObjectSpaceNormal;
    1230.                                                 description.Tangent = IN.ObjectSpaceTangent;
    1231.                                                 return description;
    1232.                                             }
    1233.  
    1234.                                             // Graph Pixel
    1235.                                             struct SurfaceDescription
    1236.                                             {
    1237.                                                 float Alpha;
    1238.                                                 float AlphaClipThreshold;
    1239.                                             };
    1240.  
    1241.                                             SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
    1242.                                             {
    1243.                                                 SurfaceDescription surface = (SurfaceDescription)0;
    1244.                                                 float4 _UV_ed350dedd8d83a8d97dc982bbc0ad788_Out_0 = IN.uv0;
    1245.                                                 float4 _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0 = SAMPLE_TEXTURE2D(Texture2D_C1A96A04, samplerTexture2D_C1A96A04, (_UV_ed350dedd8d83a8d97dc982bbc0ad788_Out_0.xy));
    1246.                                                 float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_R_4 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.r;
    1247.                                                 float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_G_5 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.g;
    1248.                                                 float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_B_6 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.b;
    1249.                                                 float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_A_7 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.a;
    1250.                                                 surface.Alpha = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_A_7;
    1251.                                                 surface.AlphaClipThreshold = 0;
    1252.                                                 return surface;
    1253.                                             }
    1254.  
    1255.                                             // --------------------------------------------------
    1256.                                             // Build Graph Inputs
    1257.  
    1258.                                             VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
    1259.                                             {
    1260.                                                 VertexDescriptionInputs output;
    1261.                                                 ZERO_INITIALIZE(VertexDescriptionInputs, output);
    1262.  
    1263.                                                 output.ObjectSpaceNormal = input.normalOS;
    1264.                                                 output.ObjectSpaceTangent = input.tangentOS;
    1265.                                                 output.ObjectSpacePosition = input.positionOS;
    1266.  
    1267.                                                 return output;
    1268.                                             }
    1269.  
    1270.                                             SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
    1271.                                             {
    1272.                                                 SurfaceDescriptionInputs output;
    1273.                                                 ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
    1274.  
    1275.  
    1276.  
    1277.  
    1278.  
    1279.                                                 output.uv0 = input.texCoord0;
    1280.                                             #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    1281.                                             #define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign =                    IS_FRONT_VFACE(input.cullFace, true, false);
    1282.                                             #else
    1283.                                             #define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
    1284.                                             #endif
    1285.                                             #undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
    1286.  
    1287.                                                 return output;
    1288.                                             }
    1289.  
    1290.  
    1291.                                             // --------------------------------------------------
    1292.                                             // Main
    1293.  
    1294.                                             #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
    1295.                                             #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
    1296.                                             #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShadowCasterPass.hlsl"
    1297.  
    1298.                                             ENDHLSL
    1299.                                         }
    1300.                                         Pass
    1301.                                         {
    1302.                                             Name "DepthOnly"
    1303.                                             Tags
    1304.                                             {
    1305.                                                 "LightMode" = "DepthOnly"
    1306.                                             }
    1307.  
    1308.                                                 // Render State
    1309.                                                 Cull Back
    1310.                                                 Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
    1311.                                                 ZTest LEqual
    1312.                                                 ZWrite On
    1313.                                                 ColorMask 0
    1314.  
    1315.                                                 // Debug
    1316.                                                 // <None>
    1317.  
    1318.                                                 // --------------------------------------------------
    1319.                                                 // Pass
    1320.  
    1321.                                                 HLSLPROGRAM
    1322.  
    1323.                                                 // Pragmas
    1324.                                                 #pragma target 4.5
    1325.                                                 #pragma exclude_renderers gles gles3 glcore
    1326.                                                 #pragma multi_compile_instancing
    1327.                                                 #pragma multi_compile _ DOTS_INSTANCING_ON
    1328.                                                 #pragma vertex vert
    1329.                                                 #pragma fragment frag
    1330.  
    1331.                                                 // DotsInstancingOptions: <None>
    1332.                                                 // HybridV1InjectedBuiltinProperties: <None>
    1333.  
    1334.                                                 // Keywords
    1335.                                                 // PassKeywords: <None>
    1336.                                                 // GraphKeywords: <None>
    1337.  
    1338.                                                 // Defines
    1339.                                                 #define _SURFACE_TYPE_TRANSPARENT 1
    1340.                                                 #define _AlphaClip 1
    1341.                                                 #define ATTRIBUTES_NEED_NORMAL
    1342.                                                 #define ATTRIBUTES_NEED_TANGENT
    1343.                                                 #define ATTRIBUTES_NEED_TEXCOORD0
    1344.                                                 #define VARYINGS_NEED_TEXCOORD0
    1345.                                                 #define FEATURES_GRAPH_VERTEX
    1346.                                                 /* WARNING: $splice Could not find named fragment 'PassInstancing' */
    1347.                                                 #define SHADERPASS SHADERPASS_DEPTHONLY
    1348.                                                 /* WARNING: $splice Could not find named fragment 'DotsInstancingVars' */
    1349.  
    1350.                                                 // Includes
    1351.                                                 #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
    1352.                                                 #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
    1353.                                                 #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
    1354.                                                 #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
    1355.                                                 #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
    1356.  
    1357.                                                 // --------------------------------------------------
    1358.                                                 // Structs and Packing
    1359.  
    1360.                                                 struct Attributes
    1361.                                                 {
    1362.                                                     float3 positionOS : POSITION;
    1363.                                                     float3 normalOS : NORMAL;
    1364.                                                     float4 tangentOS : TANGENT;
    1365.                                                     float4 uv0 : TEXCOORD0;
    1366.                                                     #if UNITY_ANY_INSTANCING_ENABLED
    1367.                                                     uint instanceID : INSTANCEID_SEMANTIC;
    1368.                                                     #endif
    1369.                                                 };
    1370.                                                 struct Varyings
    1371.                                                 {
    1372.                                                     float4 positionCS : SV_POSITION;
    1373.                                                     float4 texCoord0;
    1374.                                                     #if UNITY_ANY_INSTANCING_ENABLED
    1375.                                                     uint instanceID : CUSTOM_INSTANCE_ID;
    1376.                                                     #endif
    1377.                                                     #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    1378.                                                     uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
    1379.                                                     #endif
    1380.                                                     #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    1381.                                                     uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
    1382.                                                     #endif
    1383.                                                     #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    1384.                                                     FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
    1385.                                                     #endif
    1386.                                                 };
    1387.                                                 struct SurfaceDescriptionInputs
    1388.                                                 {
    1389.                                                     float4 uv0;
    1390.                                                 };
    1391.                                                 struct VertexDescriptionInputs
    1392.                                                 {
    1393.                                                     float3 ObjectSpaceNormal;
    1394.                                                     float3 ObjectSpaceTangent;
    1395.                                                     float3 ObjectSpacePosition;
    1396.                                                 };
    1397.                                                 struct PackedVaryings
    1398.                                                 {
    1399.                                                     float4 positionCS : SV_POSITION;
    1400.                                                     float4 interp0 : TEXCOORD0;
    1401.                                                     #if UNITY_ANY_INSTANCING_ENABLED
    1402.                                                     uint instanceID : CUSTOM_INSTANCE_ID;
    1403.                                                     #endif
    1404.                                                     #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    1405.                                                     uint stereoTargetEyeIndexAsBlendIdx0 : BLENDINDICES0;
    1406.                                                     #endif
    1407.                                                     #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    1408.                                                     uint stereoTargetEyeIndexAsRTArrayIdx : SV_RenderTargetArrayIndex;
    1409.                                                     #endif
    1410.                                                     #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    1411.                                                     FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMANTIC;
    1412.                                                     #endif
    1413.                                                 };
    1414.  
    1415.                                                 PackedVaryings PackVaryings(Varyings input)
    1416.                                                 {
    1417.                                                     PackedVaryings output;
    1418.                                                     output.positionCS = input.positionCS;
    1419.                                                     output.interp0.xyzw = input.texCoord0;
    1420.                                                     #if UNITY_ANY_INSTANCING_ENABLED
    1421.                                                     output.instanceID = input.instanceID;
    1422.                                                     #endif
    1423.                                                     #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    1424.                                                     output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
    1425.                                                     #endif
    1426.                                                     #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    1427.                                                     output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
    1428.                                                     #endif
    1429.                                                     #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    1430.                                                     output.cullFace = input.cullFace;
    1431.                                                     #endif
    1432.                                                     return output;
    1433.                                                 }
    1434.                                                 Varyings UnpackVaryings(PackedVaryings input)
    1435.                                                 {
    1436.                                                     Varyings output;
    1437.                                                     output.positionCS = input.positionCS;
    1438.                                                     output.texCoord0 = input.interp0.xyzw;
    1439.                                                     #if UNITY_ANY_INSTANCING_ENABLED
    1440.                                                     output.instanceID = input.instanceID;
    1441.                                                     #endif
    1442.                                                     #if (defined(UNITY_STEREO_MULTIVIEW_ENABLED)) || (defined(UNITY_STEREO_INSTANCING_ENABLED) && (defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE)))
    1443.                                                     output.stereoTargetEyeIndexAsBlendIdx0 = input.stereoTargetEyeIndexAsBlendIdx0;
    1444.                                                     #endif
    1445.                                                     #if (defined(UNITY_STEREO_INSTANCING_ENABLED))
    1446.                                                     output.stereoTargetEyeIndexAsRTArrayIdx = input.stereoTargetEyeIndexAsRTArrayIdx;
    1447.                                                     #endif
    1448.                                                     #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    1449.                                                     output.cullFace = input.cullFace;
    1450.                                                     #endif
    1451.                                                     return output;
    1452.                                                 }
    1453.  
    1454.                                                 // --------------------------------------------------
    1455.                                                 // Graph
    1456.  
    1457.                                                 // Graph Properties
    1458.                                                 CBUFFER_START(UnityPerMaterial)
    1459.                                                 float4 Texture2D_C1A96A04_TexelSize;
    1460.                                                 CBUFFER_END
    1461.  
    1462.                                                     // Object and Global properties
    1463.                                                     TEXTURE2D(Texture2D_C1A96A04);
    1464.                                                     SAMPLER(samplerTexture2D_C1A96A04);
    1465.                                                     SAMPLER(_SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_Sampler_3_Linear_Repeat);
    1466.  
    1467.                                                     // Graph Functions
    1468.                                                     // GraphFunctions: <None>
    1469.  
    1470.                                                     // Graph Vertex
    1471.                                                     struct VertexDescription
    1472.                                                     {
    1473.                                                         float3 Position;
    1474.                                                         float3 Normal;
    1475.                                                         float3 Tangent;
    1476.                                                     };
    1477.  
    1478.                                                     VertexDescription VertexDescriptionFunction(VertexDescriptionInputs IN)
    1479.                                                     {
    1480.                                                         VertexDescription description = (VertexDescription)0;
    1481.                                                         description.Position = IN.ObjectSpacePosition;
    1482.                                                         description.Normal = IN.ObjectSpaceNormal;
    1483.                                                         description.Tangent = IN.ObjectSpaceTangent;
    1484.                                                         return description;
    1485.                                                     }
    1486.  
    1487.                                                     // Graph Pixel
    1488.                                                     struct SurfaceDescription
    1489.                                                     {
    1490.                                                         float Alpha;
    1491.                                                         float AlphaClipThreshold;
    1492.                                                     };
    1493.  
    1494.                                                     SurfaceDescription SurfaceDescriptionFunction(SurfaceDescriptionInputs IN)
    1495.                                                     {
    1496.                                                         SurfaceDescription surface = (SurfaceDescription)0;
    1497.                                                         float4 _UV_ed350dedd8d83a8d97dc982bbc0ad788_Out_0 = IN.uv0;
    1498.                                                         float4 _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0 = SAMPLE_TEXTURE2D(Texture2D_C1A96A04, samplerTexture2D_C1A96A04, (_UV_ed350dedd8d83a8d97dc982bbc0ad788_Out_0.xy));
    1499.                                                         float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_R_4 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.r;
    1500.                                                         float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_G_5 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.g;
    1501.                                                         float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_B_6 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.b;
    1502.                                                         float _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_A_7 = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_RGBA_0.a;
    1503.                                                         surface.Alpha = _SampleTexture2D_fc482b54ae54d18297ffcebc20fdac9d_A_7;
    1504.                                                         surface.AlphaClipThreshold = 0;
    1505.                                                         return surface;
    1506.                                                     }
    1507.  
    1508.                                                     // --------------------------------------------------
    1509.                                                     // Build Graph Inputs
    1510.  
    1511.                                                     VertexDescriptionInputs BuildVertexDescriptionInputs(Attributes input)
    1512.                                                     {
    1513.                                                         VertexDescriptionInputs output;
    1514.                                                         ZERO_INITIALIZE(VertexDescriptionInputs, output);
    1515.  
    1516.                                                         output.ObjectSpaceNormal = input.normalOS;
    1517.                                                         output.ObjectSpaceTangent = input.tangentOS;
    1518.                                                         output.ObjectSpacePosition = input.positionOS;
    1519.  
    1520.                                                         return output;
    1521.                                                     }
    1522.  
    1523.                                                     SurfaceDescriptionInputs BuildSurfaceDescriptionInputs(Varyings input)
    1524.                                                     {
    1525.                                                         SurfaceDescriptionInputs output;
    1526.                                                         ZERO_INITIALIZE(SurfaceDescriptionInputs, output);
    1527.  
    1528.  
    1529.  
    1530.  
    1531.  
    1532.                                                         output.uv0 = input.texCoord0;
    1533.                                                     #if defined(SHADER_STAGE_FRAGMENT) && defined(VARYINGS_NEED_CULLFACE)
    1534.                                                     #define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN output.FaceSign =                    IS_FRONT_VFACE(input.cullFace, true, false);
    1535.                                                     #else
    1536.                                                     #define BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
    1537.                                                     #endif
    1538.                                                     #undef BUILD_SURFACE_DESCRIPTION_INPUTS_OUTPUT_FACESIGN
    1539.  
    1540.                                                         return output;
    1541.                                                     }
    1542.  
    1543.  
    1544.                                                     // --------------------------------------------------
    1545.                                                     // Main
    1546.  
    1547.                                                     #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
    1548.                                                     #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/Varyings.hlsl"
    1549.                                                     #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/DepthOnlyPass.hlsl"
    1550.  
    1551.                                                     ENDHLSL
    1552.                                                 }
    1553.                             }
    1554.                                 FallBack "Hidden/Shader Graph/FallbackError"
    1555. }
    1556.  
     
  2. Easterday

    Easterday

    Joined:
    Mar 17, 2015
    Posts:
    5
    Figured it out the Zwrite and so on was set multiple times in the code...