extern number factor; varying vec4 vpos; #ifdef VERTEX vec4 position( mat4 transform_projection, vec4 vertex_position ) { vpos = vertex_position; return transform_projection * vertex_position; } #endif #ifdef PIXEL vec4 effect( vec4 color, Image texture, vec2 texture_coords, vec2 screen_coords ) { texture_coords += vec2(factor * cos(0.1 * vpos.x), factor * sin(0.075 * vpos.y)); vec4 texcolor = Texel(texture, texture_coords); return texcolor * color; } #endif