The lost art of 3D rendering without shaders

January 22, 2017 in Programming Languages, Swift by Adrian Marius

Let’s say you wanted to create a sweet bouncing cube, like this:

A bouncing cube

You might use a 3D framework such as OpenGL or Metal. That involves writing one or more vertex shaders to transform your 3D objects, and one or more fragment shaders to draw these transformed objects on the screen.

The framework then takes these shaders and your 3D data, performs some magic, and paints everything in glorious 32-bit color.

But what exactly is that magic that OpenGL and Metal do behind the scenes?