stk-code_catmod/data/shaders/caustics.frag
vincentlj fa068d7810 OGL32CTX: Ask #version 130 for all our shaders
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14919 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2014-01-05 00:08:00 +00:00

19 lines
397 B
GLSL

#version 130
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);
}