audio-vis/shaders/water.vert

11 lines
282 B
GLSL
Raw Permalink Normal View History

2020-08-01 21:51:54 +02:00
#version 300 es
in vec2 a_position;
void main() {
// convert the position from pixels to 0.0 to 1.0
vec2 scale = a_position / vec2(255.0, 255.0);
vec2 remap = scale * 2.0;
vec2 space = remap - 1.0;
space.y = space.y * 0.85;
gl_Position = vec4(space, 0,1);
}