stk-code_catmod/data/shaders/bubble.vert
auria f23f537620 Update overworld with 'force fields' to guard the entrance to challenges as discussed. I <3 my new shader\!
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10491 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-12-26 16:46:29 +00:00

16 lines
437 B
GLSL

// Creates a bubble (wave) effect by distorting the texture depending on time
uniform float time;
varying vec2 uv;
void main()
{
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_Position = ftransform();
float delta_x = cos(time*3.0) * sin( 4.0 * gl_TexCoord[0].st.s * 6.28318531 );
float delta_y = cos(time*2.0) * sin( 3.0 * gl_TexCoord[0].st.t * 6.28318531 );
uv = gl_TexCoord[0].st + vec2(0.02*delta_x, 0.02*delta_y);
}