fix(render): clamp combined diffuse lighting to prevent overlighting

SPECIFICALLY on the top face where both lights add up to >1, causing the issue in the first place
This commit is contained in:
Sally Knight 2026-04-03 04:07:48 +03:00
parent 0d1af91386
commit 3c3a5759b8

View file

@ -46,7 +46,7 @@ void main() {
float d0 = max(dot(n, uLight0Dir), 0.0);
float d1 = max(dot(n, uLight1Dir), 0.0);
vColor = vec4(col.rgb * (uLightAmbient + uLightDiffuse * (d0 + d1)), col.a);
vColor = vec4(col.rgb * (uLightAmbient + uLightDiffuse * clamp(d0 + d1, 0.0, 1.0)), col.a);
} else {
vColor = col;
}