4 ms·
It was the most stupid and naive implementation possible, classic reverse raytracing starting from a distance from the center of the virtual camera plane and br
by jacquesm 5y ago
It was the most stupid and naive implementation possible, classic reverse raytracing starting from a distance from the center of the virtual camera plane and branching a few times to get the basics of reflection and a light model to work, then adding other features bit by bit. I don't really remember all the details, but I do remember that it was agonizingly slow on the CPU, the DSP made all the difference and allowed me to add a couple of features. The main loop was on every pixel of the virtual camera plane. I no longer have that code (or the DSP, for that matter) but it was a fun exercise and it taught me a lot of matrix/vector math.
The dithering code was also interesting, because my graphics card could not do true color I put 3x64 RGB shades in the palette and then cranked up the brightness for tetris like sets of pixels to simulate a true color display. Worked pretty well.
This was the DSP board:
https://www.signalogic.com/images/Ariel_DSP32-PC.jpg https://www.signalogic.com/images/Ariel_DSP32-PC.jpg
I managed to gently overclock it to 24 MHz without problems, it did get a bit warmer but nothing too bad.
- pjmlp 5y agoVery interesting, thanks for sharing.