| 123456789101112131415161718192021222324 |
- //
- // Vertex shader panel
- //
- #include <attributes>
- // Model uniforms
- uniform mat4 ModelMatrix;
- // Outputs for fragment shader
- out vec2 FragTexcoord;
- void main() {
- // Always flip texture coordinates
- vec2 texcoord = VertexTexcoord;
- texcoord.y = 1 - texcoord.y;
- FragTexcoord = texcoord;
- // Set position
- vec4 pos = vec4(VertexPosition.xyz, 1);
- gl_Position = ModelMatrix * pos;
- }
|