1. shader.how
  2. to
  • Add

7 shader demos

  • draw a triangle
    Draw a single triangle with a gradient fill.
  • draw a circle
    Draw a circle in a fragment shader without vertices.
  • draw lines
    Draw lines using the gl.LINES drawing mode.
  • draw points
    Draw points using the gl.POINTS drawing mode.
  • draw a full image
    Draw a full gradient using two vertices (a "quad") which cover the entire frame.
  • render a cube
    Render a rotating cube using 12 vertices.
  • draw a sine wave
    Draw a moving sine wave in a fragment shader.