16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 00:09:18 +02:00

shaders correction for burnt colors

This commit is contained in:
2026-04-26 00:18:02 +02:00
parent bc0e4a9e62
commit 76effe72df
4 changed files with 31 additions and 8 deletions

View File

@@ -54,7 +54,10 @@ vec3 apply_lights_sunless(vec3 fragcolor, vec3 fragnormal, vec3 texturecolor, fl
vec2 sunlight = calc_dir_light(lights[0], fragnormal);
float diffuseamount = (sunlight.x * param[1].x) * lights[0].intensity;
// Sharpen N.L for stronger contrast between lit and shaded cab
// surfaces (matches light_common.glsl apply_lights).
float sun_NdotL = pow(sunlight.x, 1.25);
float diffuseamount = (sun_NdotL * param[1].x) * lights[0].intensity;
fragcolor += envcolor * reflectivity;
float specularamount = (sunlight.y * param[1].y * specularity) * lights[0].intensity;
glossiness = abs(param[1].w);