Projections

  • We will accomplish this with a projection matrix.
  • The hardware uses the following matrix after the vertex shader
  •  +-      -+
     | 1 0 0 0|
     | 0 1 0 0|
     | 0 0 0 0|
     | 0 0 0 1|
     +-      -+
        
  • This effectively disposes of the z coordinate
  • What if we just want to scale to the clipping volume
  • To accomplish this we want to:
  • If we do not specify a rectangle, but rather a parallel piped
  • Here is a a Demo