panel_vertex.glsl 382 B

1234567891011121314151617181920
  1. #include <attributes>
  2. // Model uniforms
  3. uniform mat4 ModelMatrix;
  4. // Outputs for fragment shader
  5. out vec2 FragTexcoord;
  6. void main() {
  7. // Always flip texture coordinates
  8. vec2 texcoord = VertexTexcoord;
  9. texcoord.y = 1.0 - texcoord.y;
  10. FragTexcoord = texcoord;
  11. // Set position
  12. vec4 pos = vec4(VertexPosition.xyz, 1);
  13. gl_Position = ModelMatrix * pos;
  14. }