Skip to content
Snippets Groups Projects
Sprite.vert 344 B
Newer Older
  • Learn to ignore specific revisions
  • #version 450 core
    layout (location = 0) in vec2 aPos;
    layout (location = 1) in vec2 aTex;
    
    uniform mat4 uModel[128];
    uniform mat4 uView;
    uniform mat4 uProj;
    
    out vec2 Texture;
    flat out int Id;
    
    void main() {
        Texture = aTex;
        Id = gl_InstanceID;
        gl_Position =  uProj * uView * uModel[gl_InstanceID] * vec4(aPos.x, aPos.y, 0.0, 1.0);
    }