<VertexShader>
#version 420
layout(location = 0) in vec3 in_pos;
layout(location = 2) in vec2 in_uv;

layout(location = 0) out vec2 out_uv;

void main() {
	gl_Position = vec4(in_pos, 1);//mat_p2d * vec4(inPosition,1);
	out_uv = in_uv;
	out_uv.y = 1 - out_uv.y;
}

</VertexShader>
<FragmentShader>
#version 420
layout(location = 0) in vec2 in_uv;
uniform sampler2D tex0;
//layout(binding = 3) uniform sampler2D tex0;
out vec4 color;
uniform float t = 0;
uniform float intensity = 0;


vec2 ripples(vec2 a) {
	vec2 da = a - vec2(0.5, 0.5);
	float r = sqrt(da.x*da.x + da.y*da.y*0.5);
	vec2 rr = da / r;
	return a + rr * sin(r * 10.1 + t) * 0.02; // * intensity;
}

void main() {
	vec2 a = in_uv;
	color = texture(tex0, ripples(a));
}
</FragmentShader>