reduce fog factor for emissive geometry

This commit is contained in:
MihailRis 2026-07-15 19:28:02 +03:00
parent db4f05cf36
commit a6c4e9e22e

View file

@ -32,6 +32,6 @@ vec4 effect() {
light = pow(light, u_gamma);
vec3 fogColor = texture(u_skybox, dir).rgb;
float fog = calc_fog(length(u_view * vec4((modelpos.xyz - u_cameraPos) * FOG_POS_SCALE, 0.0)) / 256.0);
float fog = calc_fog(pow(length(u_view * vec4((modelpos.xyz - u_cameraPos) * FOG_POS_SCALE, 0.0)) / 256.0, (1.0f - emission * 0.7)));
return vec4(mix(texture(u_screen, v_uv).rgb * mix(1.0, light, 1.0), fogColor, fog), 1.0);
}