3 ms·
Many years ago I wrote some 3D code for the 486SX, back when floating point units for PCs were optional extras. I used a fixed-point approach with 9 bits after
by pjc50 7y ago
Many years ago I wrote some 3D code for the 486SX, back when floating point units for PCs were optional extras. I used a fixed-point approach with 9 bits after the fixed point in 32-bit integer arithmetic. It worked pretty well, but doing that does force you to design the world coordinate system to avoid objects that are too small and suffer loss of precision errors.
I don't think it would entirely do away with things like z-fighting and seam alignment issues, but it would effectively "round" them off in more cases.
I'd definitely encourage any game developer trying to represent a "big world" to investigate fixed-point systems to avoid precision-loss problems creeping in when far away from the origin.
Floating-point is slightly more future proof in a world of increasing resolutions.
- jbay808 7y agoI think fixed point is more appropriate for a Cartesian coordinate system. Floating point will have better resolution only near (0, 0); the grid will get increasingly coarse as you move away from the origin.