summaryrefslogtreecommitdiffstats
path: root/matcap.cginc
diff options
context:
space:
mode:
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)