Device Coordinates

We can learn a little about coordinate systems from this experiment. Remember the vertices we drew, ignoring the z coordinate for now.

                           -1.0, -1.0,
                            1.0, -1.0,
                            0,    1.0

Matchng these coordinates against the poisitions of the vertices, we see the x-axis ranges from -1 to 1 as does the y-axis. This will be true no matter what size we make the canvas. The right edge of the drawing surface will always have x=1 and the top will have y=1. The left edge will have x=-1 and the bottom y=-1.

Notes

The output from the vertex shader is always in this coordinate space. We will see later how to work with larger coordinate systems while still outputting coordinates in this range from the vertex shader.