CHAPTER 2

PRELIMINARY MATH

GILBERT and SULLIVAN,     THE PIRATES OF PENZANCE

I’m very well acquainted too with matters mathematical, I understand equations, both the simple and quadratical. About binomial theorem I’m teeming with a lot of news— With many cheerful facts about the square of the hypotenuse.

Well, there’s no getting around it. If you want to really understand shader programming and be able to program some wicked shaders, you have to have a firm understanding of the basic math required for 3D graphics and how it ties together. Understanding the math is a prerequisite for setting up shaders. If you’re a programmer, you really should have a good grasp on the mathematics involved in taking a vertex from a file and getting it rendered ...

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.