There is no spoon

September 14, 2021

This is an entry for @sableRaph's weekly creative coding challenge. The theme for this week was Matrix, given that a trailer for The Matrix: Ressurections recently dropped. Here is my tribute to The Matrix!

Rendering

Like a few other recent sketches, this sketch uses sphere mapping for reflections. In a fragment shader, this maps the normal at each point on a surface to a point on a 2D image, which will be used for the reflected content.

Deforming a 3D object and keeping normals intact

In August, I embarked on a surprisingly long and involved journey towards deformation of models while keeping normals intact. If you are interested in the juicy details, I wrote a long post about why this is necessary and the math and software engineering required to work around it. The result of that work is a library, glsl-autodiff, which lets me write deformation code in a shader and not break the reflection fragment shader I've been using.

So, using that libarry, I wrote some code to bend a spoon that I whipped up in Blender!