Visualizing float32 imprecision with 3D meshes

float32 precision is not uniform in space; as you move further away from the origin, the numbers become more and more spaced out. I found a blog post by Matt Pharr that visualizes this in a fun way using 3D meshes.

From the blog post, here's a car model where the camera and the scene are next to the origin of the coordinate system. It looks as you'd expect:

S3 File

If you translate the scene and camera 200,000 units in the coordinate space, the quantization is noticeably more chunky:

S3 File

At 1 million units from the origin, the precision is so low that the mesh becomes Minecrafty.

S3 File

h/t to Jon Barron for the link.

Copyright Ricardo Decal. ricardodecal.com