//The Bonk WARP-Shader PIXEL

uniform vec4 ambientColor;
uniform sampler2D colorMap;
uniform sampler2D normalMap;
uniform float timer;

void main (void)
{
	vec3 noiseVec;
	vec2 displacement;
	float scaledTimer;

	displacement = gl_TexCoord[0].st;
	scaledTimer = timer*0.05;
	displacement.x += scaledTimer;
	displacement.y -= scaledTimer;

	noiseVec = normalize(texture2D(normalMap, displacement.xy).xyz);
	noiseVec = (noiseVec * 2.0 - 1.0) * 0.035;
	
	gl_FragColor = texture2D(colorMap, gl_TexCoord[0].st + noiseVec.xy) * ambientColor;
}
