mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-14 14:59:43 -05:00
RimLightの計算時にNaNが紛れ込む問題を修正
This commit is contained in:
@@ -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)
|
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 matcapFactor = GetMToonLighting_Rim_Matcap(input);
|
||||||
const half3 directLightingFactor = unityLight.directLightColor * shadow;
|
const half3 directLightingFactor = unityLight.directLightColor * shadow;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user