summaryrefslogtreecommitdiffstats
path: root/matcap.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2026-04-10 15:30:42 -0700
committeryum <yum.food.vr@gmail.com>2026-04-10 15:31:32 -0700
commite7b8483a86a60e69441516966ef13ed3e6884696 (patch)
tree1e1b00ed726ecb8abb2d8005a02c5a4e1b5850fd /matcap.cginc
parent132f7a2ec9f69bfb05a8f8b64715eeb3fad75adc (diff)
add matcap albedo clamp toggle
Diffstat (limited to 'matcap.cginc')
-rw-r--r--matcap.cginc6
1 files changed, 6 insertions, 0 deletions
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)