Say you want to draw a full screen quad in clip space.  The straight forward way to do it is to draw two triangles to cover the viewport.  But why waste two triangles when you can do the very same thing with just one?

Triangle covering the clip space rectangle

Using one triangle to draw a full screen quad

Drawing a triangle with vertices a, b and c covers the entire screen.  To interpolate a parameter across the quad so that it has values u0,v0 and u1,v1 at the opposite corners of the quad, set the parameter values on the three vertices as in the diagram above and in the table below.

Position Parameter
x y u v
a -1 1 u0 v0
b -1 -3 u0 2v1-v0
c 3 1 2u1-u0 v0
Share