mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 13:11:00 +00:00
I don't know why exp(-dist^2) was thought to be a good idea, it's not at all correct, and I think exp(-dist) looks better.
9 lines
209 B
Text
9 lines
209 B
Text
vec4
|
|
FogBlend (vec4 color, vec4 fog)
|
|
{
|
|
float az = fog.a * 1 / gl_FragCoord.w;
|
|
vec4 fog_color = vec4 (fog.rgb, 1.0);
|
|
|
|
float fog_factor = exp (-az);
|
|
return mix (fog_color, color, fog_factor);
|
|
}
|