demotool/shaders/lib/fog.glsl

11 lines
190 B
Text
Raw Normal View History

2017-10-05 09:07:37 +02:00
//! 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 ) );
}