Shader "Builtin Depth Only" { Properties { _BaseColor ("Base Color", Color) = (1,1,1,1) [Semantic(BaseColor)] _Cutoff ("Alpha Cutoff", Range) = 0.5 [Semantic(AlphaCutoff)] _MainTex ("Base Map", 2D) = "white" [Semantic(BaseColorTexture)] } SubShader { Pass { Name "DepthOnly" Tags { "LightMode" = "DepthOnly" } Resources { PerObjectConstants (ConstantBuffer, 0, 0) [Semantic(PerObject)] MaterialConstants (ConstantBuffer, 1, 0) [Semantic(Material)] BaseColorTexture (Texture2D, 2, 0) [Semantic(BaseColorTexture)] LinearClampSampler (Sampler, 3, 0) [Semantic(LinearClampSampler)] } HLSLPROGRAM #pragma vertex MainVS #pragma fragment MainPS #pragma shader_feature_local _ XC_ALPHA_TEST #pragma backend D3D12 HLSL "depth-only.vs.hlsl" "depth-only.ps.hlsl" vs_5_0 ps_5_0 #pragma backend OpenGL GLSL "depth-only.vert.glsl" "depth-only.frag.glsl" #pragma backend Vulkan GLSL "depth-only.vert.vk.glsl" "depth-only.frag.vk.glsl" ENDHLSL } } }