3D Graphics Engine

5c5fd6f add unoptimized depth buffering

~zjm pushed to ~zjm/Moon3D git

a month ago

bb99251 add Pineda rasterization!

~zjm pushed to ~zjm/Moon3D git

a month ago


Concept art

Moon3D is a custom 3D graphics library I wrote, just for fun. I intend to support the to-be-released Playdate handheld console.

builds.sr.ht status


  • Use ints for rasterization
  • Use guard-band clipping
  • Add sub-pixel precision
  • Gouraud shading
  • Make spheres
  • Make craters


Most of the 3D stuff was learned through Ken Joy's 2009 UC Davis Computer Graphics lectures, and a copy of Computer Graphics: Principles and Practice (2nd ed, in C) by Foley, van Dam, Feiner, and Hughes (which is a beautiful textbook).

My implementation of vector is just STB's stretchy buffer.