From 933f01fdc6f1784854ea985c3f9a7adfdd3537cb Mon Sep 17 00:00:00 2001 From: tsgcpp Date: Mon, 9 Jun 2025 19:36:13 +0900 Subject: [PATCH] Fix "MTOON_SHADOW_COORD" to use an argument for it --- .../Shaders/vrmc_materials_mtoon_render_pipeline.hlsl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Assets/VRM10/MToon10/Shaders/vrmc_materials_mtoon_render_pipeline.hlsl b/Assets/VRM10/MToon10/Shaders/vrmc_materials_mtoon_render_pipeline.hlsl index bcc46dc8b..3b9b81a98 100644 --- a/Assets/VRM10/MToon10/Shaders/vrmc_materials_mtoon_render_pipeline.hlsl +++ b/Assets/VRM10/MToon10/Shaders/vrmc_materials_mtoon_render_pipeline.hlsl @@ -52,11 +52,11 @@ #ifdef MTOON_URP #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) -#define MTOON_SHADOW_COORD input.shadowCoord +#define MTOON_SHADOW_COORD(input) input.shadowCoord #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) -#define MTOON_SHADOW_COORD TransformWorldToShadowCoord(input.positionWS) +#define MTOON_SHADOW_COORD(input) TransformWorldToShadowCoord(input.positionWS) #else -#define MTOON_SHADOW_COORD float4(0, 0, 0, 0) +#define MTOON_SHADOW_COORD(input) float4(0, 0, 0, 0) #endif #if defined(SHADOWS_SHADOWMASK) && defined(LIGHTMAP_ON) @@ -70,7 +70,7 @@ #define MTOON_LIGHT_DESCRIPTION(input, atten, lightDir, lightColor) \ const half3 lightDir = _MainLightPosition.xyz; \ const half3 lightColor = _MainLightColor.rgb; \ - const float atten = MainLightShadow(MTOON_SHADOW_COORD, input.positionWS, MTOON_SAMPLE_SHADOWMASK(input.lightmapUV), _MainLightOcclusionProbes); + const float atten = MainLightShadow(MTOON_SHADOW_COORD(input), input.positionWS, MTOON_SAMPLE_SHADOWMASK(input.lightmapUV), _MainLightOcclusionProbes); #else