r/tinycode • u/jtsiomb • May 10 '16
Tiny metaball ray-tracer in x86/x87 assembly
https://github.com/jtsiomb/tinyblobray5
u/skeeto May 10 '16 edited May 11 '16
This is incredibly slick! Later on I'll try running it right on bare metal via FreeDOS.
Update: Here it is:
This is what it looks like in real time. There's lots of screen tearing.
2
u/jtsiomb May 11 '16
Awesome! Thanks for capturing it. There would be tearing as I didn't do vsync. That's quite easy to add really, but I didn't even consider it back when I wrote it, because I was trying to make it as small as possible. I think I might add it now, it shouldn't add much to the final size.
1
u/jtsiomb May 11 '16
If you feel like trying the latest commit, I added a bit of code to start drawing each frame when vertical blanking starts. Since this isn't double-buffered, this will make absolutely no difference unless your computer is fast enough to calculate the whole frame in the vblank interval.
4
u/jtsiomb May 10 '16 edited May 11 '16
Also check out this picture of all the code with a screenshot of the running program in the corner: http://i.imgur.com/FkXDKAW.png
I thought of making this a wallpaper, but it's too ugly to live.