From 8e0322aa7044758458b8633127dcaa1d66ff61de Mon Sep 17 00:00:00 2001 From: Masataka SUMI Date: Thu, 15 Jul 2021 19:57:43 +0900 Subject: [PATCH] fix direcitonal light attenuation multiply. --- .../Resources/VRM10/vrmc_materials_mtoon_lighting_mtoon.hlsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/VRMShaders/VRM10/MToon10/Resources/VRM10/vrmc_materials_mtoon_lighting_mtoon.hlsl b/Assets/VRMShaders/VRM10/MToon10/Resources/VRM10/vrmc_materials_mtoon_lighting_mtoon.hlsl index c1d3513bf..494ceb559 100644 --- a/Assets/VRMShaders/VRM10/MToon10/Resources/VRM10/vrmc_materials_mtoon_lighting_mtoon.hlsl +++ b/Assets/VRMShaders/VRM10/MToon10/Resources/VRM10/vrmc_materials_mtoon_lighting_mtoon.hlsl @@ -46,8 +46,8 @@ inline half GetMToonLighting_Shade(const UnityLighting lighting, const MToonInpu if (MToon_IsForwardBasePass()) { - const half shadeInput = lerp(-1, 1, mtoon_linearstep(-1, 1, dotNL) * lighting.directLightAttenuation); - return mtoon_linearstep(-1.0 + shadeToony, +1.0 - shadeToony, shadeInput + shadeShift); + const half shadeInput = lerp(-1, 1, mtoon_linearstep(-1, 1, dotNL)); + return mtoon_linearstep(-1.0 + shadeToony, +1.0 - shadeToony, shadeInput + shadeShift) * lighting.directLightAttenuation; } else {