Hi folks! How are your molecules doing?
In December 2025 I had the pleasure of speaking at the PlayMinas Intergame Summit, the first scientific congress of the games industry in Brazil, right here in Belo Horizonte. The talk was in Portuguese, Matemática & Games: 3 Equações Revolucionárias, and the recording is on PlayMinas’ YouTube channel, under the session’s title in the program, Matemática da Luz. This post is the English version, slides included.
The idea was simple: take three equations that most of us met in school and show how each one became a revolution in games, first in software and then, eventually, in silicon. No magic, just math (and a few decades of very clever engineering)!

Equation I: The Dot Product
Our first guest is the humble dot product. It has two faces, and both matter:
The algebraic form is what the hardware computes: multiplies and adds. The angular form is what we mean: how aligned two directions are.

That second meaning is exactly what Lambert needed. For a perfectly matte (Lambertian) surface, the reflected intensity only depends on the angle between the surface normal and the direction to the light :
Rough, matte surfaces scatter light in every direction, which is why this simple model works so well for them.

Now, computing that for every pixel, every frame, was way too expensive in the 90s. Quake’s answer was to do it once: bake the static lighting into textures, the famous lightmaps, with an intensity proportional to , and simply read it back at runtime. Fast lights and shadows for static geometry, paid for at build time.

And since games do a lot of dot products, CPUs eventually grew hardware for them. SIMD extensions like MMX and SSE let a single instruction (e.g. ADDPS) operate on four floats at once, in 128-bit XMM registers. Silicon, meet math.

Equation II: The Rendering Equation
The second equation is the one at the bottom of every page of this blog, Kajiya’s rendering equation (1986):
The light leaving a point is the light it emits plus all the light arriving from the hemisphere above it, weighted by the BRDF and, look who’s back, a dot product. It describes global illumination completely, which is exactly why it is so hard to solve.

For years the practical answer was, again, baking. Radiosity splits the scene into patches and computes how much light flows between each pair, a transfer that depends on how much the two patches face each other, , and stores the result in lightmaps. Mirror’s Edge is a beautiful example of what that soft, baked global illumination can look like.

What changed the game was the GPU becoming a general-purpose processor. With unified shaders (GeForce 8 and beyond), the same stream processors run vertex, pixel, geometry and compute work, and compute shaders opened the door to solving much more of the rendering equation every frame. That is the road that led to real-time path tracing in games like Cyberpunk 2077.

Equation III: The Quadratic Equation
To trace a ray we need to know what it hits, and our third equation answers that. A ray is , and a sphere is every point with . Plug one into the other and you get the good old quadratic:
The discriminant tells the whole story: , the ray misses; , it grazes the sphere; , it enters and leaves.

Testing every ray against every triangle would take forever, so we wrap the scene in a hierarchy of bounding volumes (a BVH): test the root first; only if the ray hits it, test the children; only then test the object inside. If the ray misses the big sphere, we never touch the teapot at all.

And here is the final plot twist: these tests now live in silicon. Dedicated ray tracing units, like the ones in the PS5 Pro, traverse the BVH and run the ray–box and ray–triangle tests in hardware, freeing the shader cores for everything else. That is what makes reflections, shadows and global illumination possible in real time, in games like Ratchet & Clank: Rift Apart.

Zoom into one of those units and you find our math again. A single instruction, IMAGE_BVH8_INTERSECT_RAY, tests a ray against eight boxes of a BVH node at once with the slab method:
The ray hits the box when . Eight of those per instruction, in parallel. SIMD again!

Conclusion
Three equations: a dot product, an integral and a quadratic. The first lit Quake, the second drove decades of research in global illumination, and the third ended up as an instruction in a GPU’s ISA. Every time the math got too expensive, we first baked it, then built hardware for it.
Thanks again to the PlayMinas team for the invitation, and to everyone who came to Sala 3!
Live long and prosper!