5899a26aad
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14590 178a84e3-b1eb-0310-8ba1-8eac791a3b58
17 lines
276 B
GLSL
17 lines
276 B
GLSL
uniform sampler2D tex;
|
|
uniform vec3 col;
|
|
|
|
void main()
|
|
{
|
|
vec4 res = texture2D(tex, gl_TexCoord[0].xy);
|
|
|
|
// Keep the sun fully bright, but fade the sky
|
|
float mul = distance(res.xyz, col);
|
|
mul = step(mul, 0.02);
|
|
mul *= 0.97;
|
|
|
|
res = res * vec4(mul);
|
|
|
|
gl_FragColor = res;
|
|
}
|