diff --git a/MToon/Resources/Shaders/MToon.shader b/MToon/Resources/Shaders/MToon.shader index 91c5052..e689195 100644 --- a/MToon/Resources/Shaders/MToon.shader +++ b/MToon/Resources/Shaders/MToon.shader @@ -130,8 +130,30 @@ Shader "VRM/MToon" ENDCG } - // Cast transparent shadow - UsePass "Standard/SHADOWCASTER" + // ------------------------------------------------------------------ + // Shadow rendering pass + Pass { + Name "ShadowCaster" + Tags { "LightMode" = "ShadowCaster" } + + ZWrite On ZTest LEqual + + CGPROGRAM + #pragma target 2.0 + + #pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON + #pragma shader_feature _METALLICGLOSSMAP + #pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + #pragma skip_variants SHADOWS_SOFT + #pragma multi_compile_shadowcaster + + #pragma vertex vertShadowCaster + #pragma fragment fragShadowCaster + + #include "UnityStandardShadow.cginc" + + ENDCG + } } Fallback "Unlit/Texture"