diff --git a/Assets/VRMShaders/VRM10/MToon10/Resources/VRM10/vrmc_materials_mtoon_urp.shader b/Assets/VRMShaders/VRM10/MToon10/Resources/VRM10/vrmc_materials_mtoon_urp.shader index 32e2ade9d..593becb3a 100644 --- a/Assets/VRMShaders/VRM10/MToon10/Resources/VRM10/vrmc_materials_mtoon_urp.shader +++ b/Assets/VRMShaders/VRM10/MToon10/Resources/VRM10/vrmc_materials_mtoon_urp.shader @@ -161,7 +161,63 @@ Shader "VRM10/Universal Render Pipeline/MToon10" ENDHLSL } - // Shadow Caster Path + // Depth Only Pass + Pass + { + Name "DepthOnly" + Tags { "LightMode" = "DepthOnly" } + + Cull [_M_CullMode] + ZWrite On + ColorMask 0 + + HLSLPROGRAM + #pragma target 3.0 + + // Unity defined keywords + #pragma multi_compile_instancing + + #pragma multi_compile __ _ALPHATEST_ON _ALPHABLEND_ON + + #pragma vertex MToonDepthOnlyVertex + #pragma fragment MToonDepthOnlyFragment + + #define MTOON_URP + + #include "./vrmc_materials_mtoon_depthonly_vertex.hlsl" + #include "./vrmc_materials_mtoon_depthonly_fragment.hlsl" + ENDHLSL + } + + // Depth Normals Pass + Pass + { + Name "DepthNormals" + Tags { "LightMode" = "DepthNormals" } + + Cull [_M_CullMode] + ZWrite On + + HLSLPROGRAM + #pragma target 3.0 + + // Unity defined keywords + #pragma multi_compile_instancing + + #pragma multi_compile __ _ALPHATEST_ON _ALPHABLEND_ON + #pragma multi_compile __ _NORMALMAP + + #pragma vertex MToonDepthNormalsVertex + #pragma fragment MToonDepthNormalsFragment + + #define MTOON_URP + + #include "./vrmc_materials_mtoon_depthnormals_vertex.hlsl" + #include "./vrmc_materials_mtoon_depthnormals_fragment.hlsl" + ENDHLSL + } + + // Shadow Caster Pass Pass { Name "ShadowCaster"