panel_vertex.glsl 412 B

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