February 2019
Intermediate to advanced
292 pages
6h 55m
English
You may recall that at the beginning of this chapter I said that it was possible to strategically color portions of a CSG shape. It’s true—the key is to remember that intersecting a ray with a CSG shape preserves the original intersections with the original primitive shapes. Think about how your ray tracer determines the color to use for a given intersection. In Chapter 6, Light and Shading, you stored a material structure on each object and used the material from the intersected object to determine what color the intersection should be.

This still holds true with CSG intersections. Consider again this illustration of a ...
Read now
Unlock full access