Pass { Tags{"LightMode" = "Universal2D"} // Material options generated by graph ${Tags} ${Blending} ${Culling} ${ZTest} ${ZWrite} HLSLPROGRAM // Required to compile gles 2.0 with standard srp library #pragma enable_d3d11_debug_symbols #pragma prefer_hlslcc gles #pragma exclude_renderers d3d11_9x #pragma target 2.0 #pragma vertex vert #pragma fragment frag // Defines generated by graph ${Defines} #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/UnityInstancing.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" ${Graph} struct GraphVertexOutput { float4 clipPos : SV_POSITION; // Interpolators defined by graph ${VertexOutputStruct} }; GraphVertexOutput vert (GraphVertexInput v) { GraphVertexOutput o = (GraphVertexOutput)0; // Vertex transformations performed by graph ${VertexShader} VertexDescriptionInputs vdi = (VertexDescriptionInputs)0; // Vertex description inputs defined by graph ${VertexShaderDescriptionInputs} VertexDescription vd = PopulateVertexData(vdi); v.vertex.xyz = vd.Position; // Vertex shader outputs defined by graph ${VertexShaderOutputs} VertexPositionInputs vertexInput = GetVertexPositionInputs(v.vertex.xyz); o.clipPos = vertexInput.positionCS; return o; } half4 frag (GraphVertexOutput IN ${FaceSign}) : SV_Target { // Pixel transformations performed by graph ${PixelShader} SurfaceDescriptionInputs surfaceInput = (SurfaceDescriptionInputs)0; // Surface description inputs defined by graph ${PixelShaderSurfaceInputs} SurfaceDescription surf = PopulateSurfaceData(surfaceInput); float3 Albedo = float3(0.5, 0.5, 0.5); float3 Specular = float3(0, 0, 0); float Metallic = 1; float3 Normal = float3(0, 0, 1); float3 Emission = 0; float Smoothness = 0.5; float Occlusion = 1; float Alpha = 1; float AlphaClipThreshold = 0; // Surface description remap performed by graph ${PixelShaderSurfaceRemap} // Computes fog factor per-vertex half4 color = half4(Albedo, Alpha); #if _AlphaClip clip(Alpha - AlphaClipThreshold); #endif return color; } ENDHLSL }