RimLightの計算時にNaNが紛れ込む問題を修正

This commit is contained in:
notargs 2022-11-02 17:32:17 +09:00
parent 46e3ec70d5
commit 6b02280c19

View File

@ -134,7 +134,7 @@ inline half3 GetMToonLighting_Rim_Matcap(const MToonInput input)
inline half3 GetMToonLighting_Rim(const UnityLighting unityLight, const MToonInput input, const half shadow)
{
const half3 parametricRimFactor = pow(saturate(1.0 - dot(input.normalWS, input.viewDirWS) + _RimLift), _RimFresnelPower) * _RimColor.rgb;
const half3 parametricRimFactor = pow(saturate(1.0 - dot(input.normalWS, input.viewDirWS) + _RimLift), max(_RimFresnelPower, EPS_COL)) * _RimColor.rgb;
const half3 matcapFactor = GetMToonLighting_Rim_Matcap(input);
const half3 directLightingFactor = unityLight.directLightColor * shadow;