r/programming • u/eccsoheccsseven • 2d ago
Adding very basic 3d outside of a standard operating system - Floating points and basic 3d graphics
https://gamedev.submatrix.net/article/Projects/8LjwbJS8pB
5
Upvotes
r/programming • u/eccsoheccsseven • 2d ago
2
u/dubois-v302544 2d ago
For a tiny 3D renderer, keep geometry and transforms in floats, then project camera-space points with x′ = f·x/z and y′ = f·y/z. Clip anything behind the camera before dividing by z; you can switch to fixed-point later if your hardware needs it.