June 2013
Intermediate to advanced
346 pages
8h 42m
English
In Chapter 2, Defining Vertices and Shaders, we learned how to draw objects with a single color in a uniform, as seen in the following image:

We already know that that we’re limited to drawing points, lines, and triangles, and we build everything up from that. Since we’re limited to those three primitives, how can we represent a complex scene with many different colors and shades?
One way we could do it is by using a million small triangles, each with a different color. If we use enough triangles, we can fool the viewer into seeing a nice, complex scene with a rich variation of colors. While this could technically work, the performance ...
Read now
Unlock full access