audio-vis/shaders/wave.vert

11 lines
282 B
GLSL
Raw Normal View History

2020-04-05 15:28:22 +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);
}