From e7b8483a86a60e69441516966ef13ed3e6884696 Mon Sep 17 00:00:00 2001 From: yum Date: Fri, 10 Apr 2026 15:30:42 -0700 Subject: add matcap albedo clamp toggle --- matcap.cginc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'matcap.cginc') diff --git a/matcap.cginc b/matcap.cginc index 150ed98..537e62a 100644 --- a/matcap.cginc +++ b/matcap.cginc @@ -81,6 +81,9 @@ void apply_matcaps_and_rim_lighting(v2f i, inout Pbr pbr, inout LightData light_ float m0_mask = 1; #endif applyMatcap(pbr, m0, _Matcap0_Mode, m0_mask); +#if defined(_MATCAP0_ALBEDO_CLAMP) + pbr.albedo.rgb = saturate(pbr.albedo.rgb); +#endif #endif // _MATCAP0 #if defined(_MATCAP1) @@ -98,6 +101,9 @@ void apply_matcaps_and_rim_lighting(v2f i, inout Pbr pbr, inout LightData light_ float m1_mask = 1; #endif applyMatcap(pbr, m1, _Matcap1_Mode, m1_mask); +#if defined(_MATCAP1_ALBEDO_CLAMP) + pbr.albedo.rgb = saturate(pbr.albedo.rgb); +#endif #endif // _MATCAP1 #if defined(_RIM_LIGHTING0) -- cgit v1.2.3