Back to index

Vertex ID

Exercises

  1. Move the triangle by offsetting the gl_Position.
  2. Without changing the vertices list, move the top vertex of the triangle using gl_VertexID.

Vertices

Vertex shader

Fragment shader