Part II: Rasterization

The first part of this book should be proof that ray tracers are beautiful pieces of software that can produce stunningly beautiful images using nothing but straightforward, intuitive algorithms.

Sadly, this purity comes at a cost: performance. While there are numerous way to optimize and parallelize ray tracers, they’re still too computationally expensive for real-time performance; and while hardware continues to go faster every year, some applications demand pictures just as beautiful but a hundred times faster today. Of all these applications, games are the most demanding: we expect picture-perfect images drawn at least 60 times per second. Raytracers just don’t cut it.

How do games do it, then?

The answer is a completely different family of algorithms which will be explored in this second part of the book. Unlike raytracing, which was derived from simple geometrical models about how images are formed in your eye or a camera, we’ll now start from the opposite end - what kind of things we can draw on the screen, and how to draw them as fast as possible. This will yield completely different algorithms that will produce relatively similar results.

<< Raytracer pseudocode · Lines >>
Computer Graphics from scratch · Introduction · Table of contents · Common concepts
Part I: Raytracing · Basic ray tracing · Light · Shadows · Reflection · Arbitrary camera · Beyond the basics · Raytracer pseudocode · Part II: Rasterization · Lines · Filled triangles · Shaded triangles · Perspective projection · Scene setup · Clipping · Hidden surface removal · Shading · Textures
Found an error? Everything is in Github.