From bc933ec876b206cac30af65ec87425b2436440f6 Mon Sep 17 00:00:00 2001 From: Masataka SUMI Date: Tue, 7 May 2019 18:26:57 +0900 Subject: [PATCH] fix ShadowCaster's keywords & cullmode --- MToon/Resources/Shaders/MToon.shader | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/MToon/Resources/Shaders/MToon.shader b/MToon/Resources/Shaders/MToon.shader index e689195..3d66906 100644 --- a/MToon/Resources/Shaders/MToon.shader +++ b/MToon/Resources/Shaders/MToon.shader @@ -130,28 +130,23 @@ Shader "VRM/MToon" ENDCG } - // ------------------------------------------------------------------ // Shadow rendering pass - Pass { + Pass + { Name "ShadowCaster" Tags { "LightMode" = "ShadowCaster" } - ZWrite On ZTest LEqual + Cull [_CullMode] + 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 target 3.0 + #pragma multi_compile _ _ALPHATEST_ON _ALPHABLEND_ON #pragma multi_compile_shadowcaster - #pragma vertex vertShadowCaster #pragma fragment fragShadowCaster - #include "UnityStandardShadow.cginc" - ENDCG } }