From 688bde313fc0e9271074e56e01fe9ac6fbd599bd Mon Sep 17 00:00:00 2001 From: benpm Date: Tue, 30 Sep 2025 15:13:14 -0600 Subject: [PATCH] make shadowed fragments a bit darker --- modules/base/shaders/model_fs.glsl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/base/shaders/model_fs.glsl b/modules/base/shaders/model_fs.glsl index a6a8810b64..fb4c6269de 100644 --- a/modules/base/shaders/model_fs.glsl +++ b/modules/base/shaders/model_fs.glsl @@ -197,7 +197,8 @@ Fragment getFragment() { float shadowFactor = accum / norm; // Apply shadow to diffuse lighting (with ambient contribution) - totalLightColor *= ambientIntensity + (1.f - ambientIntensity) * shadowFactor; + vec3 ambientLightColor = ambientIntensity * lightColor * diffuseAlbedo.rgb; + totalLightColor *= ambientLightColor + (1.f - ambientLightColor) * shadowFactor; // Apply shadow to specular lighting (more aggressive - specular highlights should be sharply attenuated in shadows) totalSpecularColor *= shadowFactor;