Merge pull request #2540 from Santarh/matcapDefaultBehaviour

`matcapTexture` should be 0.0 when it doesn't exist.
This commit is contained in:
ousttrue 2024-12-23 14:31:12 +09:00 committed by GitHub
commit c2a793cc1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -29,7 +29,7 @@ Shader "VRM10/MToon10"
_EmissionMap ("emissiveTexture", 2D) = "white" {} // Unity specified name
// Rim Lighting
_MatcapColor ("mtoon.matcapFactor", Color) = (0, 0, 0, 1)
_MatcapColor ("mtoon.matcapFactor", Color) = (1, 1, 1, 1)
_MatcapTex ("mtoon.matcapTexture", 2D) = "black" {}
_RimColor ("mtoon.parametricRimColorFactor", Color) = (0, 0, 0, 1)
_RimFresnelPower ("mtoon.parametricRimFresnelPowerFactor", Range(0, 100)) = 5.0

View File

@ -118,7 +118,7 @@ inline half3 GetMToonLighting_Rim_Matcap(const MToonInput input)
return _MatcapColor.rgb * MTOON_SAMPLE_TEXTURE2D(_MatcapTex, matcapUv).rgb;
}
return _MatcapColor.rgb;
return 0;
}
inline half3 GetMToonLighting_Rim(const UnityLighting unityLight, const MToonInput input, const half shadow)

View File

@ -29,7 +29,7 @@ Shader "VRM10/Universal Render Pipeline/MToon10"
_EmissionMap ("emissiveTexture", 2D) = "white" {} // Unity specified name
// Rim Lighting
_MatcapColor ("mtoon.matcapFactor", Color) = (0, 0, 0, 1)
_MatcapColor ("mtoon.matcapFactor", Color) = (1, 1, 1, 1)
_MatcapTex ("mtoon.matcapTexture", 2D) = "black" {}
_RimColor ("mtoon.parametricRimColorFactor", Color) = (0, 0, 0, 1)
_RimFresnelPower ("mtoon.parametricRimFresnelPowerFactor", Range(0, 100)) = 5.0