CHAPTER 3

MATHEMATICS OF LIGHTING AND SHADING

JOHANN VON NEUMANN

JAMES M. BARRIE

In mathematics you don’t understand things. You just get used to them.

Nothing is really work unless you would rather be doing something else.

One of the nice things about shaders is that you can create your own for whatever special effects you are looking for. In fact, one of the reasons that shaders have finally made it into mainstream 3D computer graphics is the flexibility that they provide, which can finally be realized in real time on consumer grade hardware. Unfortunately, with power comes responsibility—the responsibility to understand how lighting and shading in computer graphics is traditionally done and how you can do it yourself (or do it differently) ...

Get Real-Time Shader Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.