- Joined
- Jul 22, 2017
I decided to get an early start this year and make a second attempt at writing a 3D software renderer for TempleOS. I've gotten further than before including:
-Per-Vertex Normal Blending
-Skeletal Animation
-Multi-Bone Influence
-Per-pixel dynamic point light fragment shader using a monochromatic palette without dither to optimize for VGA transfer (TempleOS only updates dirty chunks)
-Near plane clipping
-Backface culling
Though I confess I didn't write this in HolyC. It's C program that I build with GCC into a freestanding ELF shared object. I can load an execute this ELF on TempleOS using a ELF loader/linker written in HolyC along with a HolyC engine harness. This gives me access to single precision floats and SIMD instructions, plus the gains from having an optimizing compiler. I stole code from musl to provide the fundamentals and math functions. HandmadeMath for SIMD math. stb_sprintf for string formatting. Dynamically linked to SDL so the ELF linker can patch in TempleOS functions. If it wasn't for a handful of #ifdef's you can run literally the exact same .so file on TempleOS and Linux, natively.
Shout out to Alec Murphy for creating the ELF/SDL proof of concept.
-Per-Vertex Normal Blending
-Skeletal Animation
-Multi-Bone Influence
-Per-pixel dynamic point light fragment shader using a monochromatic palette without dither to optimize for VGA transfer (TempleOS only updates dirty chunks)
-Near plane clipping
-Backface culling
Though I confess I didn't write this in HolyC. It's C program that I build with GCC into a freestanding ELF shared object. I can load an execute this ELF on TempleOS using a ELF loader/linker written in HolyC along with a HolyC engine harness. This gives me access to single precision floats and SIMD instructions, plus the gains from having an optimizing compiler. I stole code from musl to provide the fundamentals and math functions. HandmadeMath for SIMD math. stb_sprintf for string formatting. Dynamically linked to SDL so the ELF linker can patch in TempleOS functions. If it wasn't for a handful of #ifdef's you can run literally the exact same .so file on TempleOS and Linux, natively.
Shout out to Alec Murphy for creating the ELF/SDL proof of concept.
Last edited: