demotool/shaders/lib/fog.glsl
2017-10-05 09:07:37 +02:00

10 lines
190 B
GLSL

//! type library
vec3 FOG_Apply(
in vec3 color ,
in float dist ,
in float attenuation ,
in vec3 background )
{
return mix( background , color , exp( - dist * dist * attenuation ) );
}