5899a26aad
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14590 178a84e3-b1eb-0310-8ba1-8eac791a3b58
18 lines
384 B
GLSL
18 lines
384 B
GLSL
uniform sampler2D tex;
|
|
uniform sampler2D caustictex;
|
|
uniform vec2 dir;
|
|
uniform vec2 dir2;
|
|
|
|
void main()
|
|
{
|
|
vec2 tc = gl_TexCoord[0].xy;
|
|
|
|
vec3 col = texture2D(tex, tc).xyz;
|
|
float caustic = texture2D(caustictex, tc + dir).x;
|
|
float caustic2 = texture2D(caustictex, (tc.yx + dir2 * vec2(-0.6, 0.3)) * vec2(0.6)).x;
|
|
|
|
col += caustic * caustic2 * 10.0;
|
|
|
|
gl_FragColor = vec4(col, 1.0);
|
|
}
|