paysages3d/src/render/opengl/shaders/terrain.frag
Michaël Lemaire f9d0918bcb opengl: Fixed color range of terrain textures
This will lose precision, but is sufficient right now, and
avoids bright textures (like snow) to be greyed.
2016-01-06 01:45:27 +01:00

17 lines
378 B
GLSL

uniform sampler2D groundTexture;
in vec2 texcoord;
out vec4 final_color;
void main(void)
{
final_color = vec4(texture(groundTexture, texcoord).rgb * 5.0, 1.0);
final_color = applyAerialPerspective(final_color);
final_color = applyToneMapping(final_color);
final_color = applyMouseTracking(unprojected, final_color);
final_color.a = distanceFadeout();
}