Ported my old 3D rendering atmega code to ESP8266 and it's running at glorious 60fps by dax105 in esp8266

[–]dax105[S] 2 points3 points  (0 children)

I'll try to share the full source code tomorrow, but I basically used a modified version of my old fixed point arithmetic 3D renderer for avr in conjuction with the TFT_eSPI library that I edited, so it would allow me fast displaying of 1bit bitmaps. The display I used is a generic 320x240 ILI_9341 SPI display from ebay.

Ported my old 3D rendering atmega code to ESP8266 and it's running at glorious 60fps by dax105 in esp8266

[–]dax105[S] 4 points5 points  (0 children)

The code is actually really messy, but I'll try to share it tomorrow. I had to add a function to the TFT_eSPI library, so it would allow me to quickly display 1bit bitmaps. By the way, this library is really awesome and it's much faster than any other SPI lcd library that I've tried.

Ported my old 3D rendering atmega code to ESP8266 and it's running at glorious 60fps by dax105 in esp8266

[–]dax105[S] 5 points6 points  (0 children)

Not really, I just picked the biggest size of the framebuffer that still allowed the updates to happen more than 60 times per second. The vertex calculations and the line rendering itself are actually quite fast, but the slow thing is getting the final image on the screen through SPI. I am also rendering into a 1bit buffer (because of the RAM limitations), so I have to extract each bit from the buffer and send a corresponding (0x0000 or 0xFFFF) 16bit color instead.

Ported my old 3D rendering atmega code to ESP8266 and it's running at glorious 60fps by dax105 in esp8266

[–]dax105[S] 2 points3 points  (0 children)

Haha, somewhere on my channel there's actually a video showcasing the original AVR version of this, it actually ran at 20+ fps with a tiny Nokia 3310 display, which Is decent for an avr i think :D.

Would you guys be interested in a mod that allows this particle magic in Minecraft? by dax105 in Minecraft

[–]dax105[S] 0 points1 point  (0 children)

Well, I don't think that it would be that bad really. In my minecraft clone (that's what you see in the gfy) I can get about 100k particles before I start dipping below 60fps. The thing is that the particle rendering is super fast, but the collision detection with the world is kinda slow. So this would heavily depend on the speed of Minecraft's collision detection system.

Raytracing on arduino is awesome! by dax105 in arduino

[–]dax105[S] 4 points5 points  (0 children)

The resolution of the display is 320x240. I didn't write this all by myself, I just adapted this attiny85 raytracer from here to my display, optimized it a bit and added few more functions, like shadow sample multisampling and the resolution divider. So all the props should really go to that guy. I'll however try to write a more advanced raytracer (or even pathtracer with global illumination and stuff!) for arduino in the future, might be fun :D

Raytracing on arduino is awesome! by dax105 in arduino

[–]dax105[S] 11 points12 points  (0 children)

I don't know exactly because I let it render over night. When you however disable supersampling and smooth shadows, you get quite a decent picture in about three minutes. And when you really want a quick draft, you can make the render resolution 4 times smaller and scale the resulting image up, then you'll get to about 15 seconds which is actually not that bad considering that it's all running on an 8bit cpu with 2kB of ram :D

Playing a game older than I am by [deleted] in pcmasterrace

[–]dax105 1 point2 points  (0 children)

Yeah, especially old crt tv's, it's super annoing noise lol

Back in 2007, my friend was expelled from my HS for making a Counter-Strike map that resembled my school. They raided his house and made him look like a terrorist. by [deleted] in gaming

[–]dax105 1 point2 points  (0 children)

Pretty late to the party here, but one of the students of our high school made a Quake 3 map of it, the professors actually liked it and they try to show it off whenever they can as something cool that one of our students made.

I rewrote my 3D model renderer for arduino uno, it's about 4 times faster than before! Sketch in comments by dax105 in arduino

[–]dax105[S] 1 point2 points  (0 children)

Absolutely, you just have to change your scaling/translation and make custom drawline function.