make shadowed fragments a bit darker

This commit is contained in:
benpm
2025-09-30 15:13:14 -06:00
parent e391d61383
commit 688bde313f

View File

@@ -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;