Hacker News new | comments | show | ask | jobs | submit login
Ray tracing demo based on Minecraft
3 points by Overv 1419 days ago | hide | past | web | favorite
I've wanted to write a ray tracer accelerated by the GPU for a while, but I wanted to make it a bit more interesting than procedurally generated meshes, so I thought about doing it with a uniform voxel grid to make a little tech demo inspired by Minecraft.

I'm still very new to this stuff, but I think it was interesting enough to share it with you. Perhaps someone interested in the same subject will find it interesting to look at :).

I decided to do it in a fragment shader instead of using OpenCL to have the graphics related functionality GLSL as a language offers and because I thought it would be generally easier to set up.

I expected that the loops and branches would have a huge impact on the performance, but it turned out to be as horrible as I expected. Still, I think the performance could be greatly improved, perhaps with insight by people who are more experienced with this kind of thing.

Source: https://github.com/Overv/raycraft Windows binary: http://filesmelt.com/dl/raycraft.zip (You may need the VS2012 runtime, even though I compiled it with VS2010 it did some weird stuff.)

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact