tofu

Making something with OpenGL in Go
Log | Files | Refs

vertex.glsl (205B)


      1 #version 330 core
      2 layout (location = 0) in vec3 pos;
      3 uniform float magnitude;
      4 uniform vec2 center;
      5 out vec2 fpos;
      6 void main() {
      7 	gl_Position = vec4(pos, 1.0);
      8 	fpos = (pos.xy * 2 * magnitude) + center;
      9 }
     10