<<< Vertex Shading Stage     Index     Uniforms >>>

3. Vertex Shader Example


  • Examples of in global variables

    • Raw vertex positions

    • Normals

    • Texture coordinates

    • Vertex colors

    • Any other things -- you decide

  • 
    #version 130
    
    // vertices in NDC coordinate system:
    in vec4 vPosition;
    
    void main () {
        gl_Position = s_vPosition;
    }
    
    

<<< Vertex Shading Stage     Index     Uniforms >>>