This is a fairly basic (and currently proof of concept) ray tracer written in an opengl fragment shader.
Shader is hosted by a renderer written in javascript (or C++ in the prototypes dir).
A live version should be available on my website
Before viewing the page I recommend:
I've got this to a point where it could be useful, but mainly it's a side-effect of me learning the concepts. Watch this space if you like but I don't expect rapid development on this.
General TODO list:
Currently only spheres and planes are supported, but the interfaces should be extensible enough for new functions.
The shader setup is fairly messy and inefficient at the moment, but boils down to
So far testing has been limited, mostly performed on Linux, NVidia Quadro M2000, running the proprietary drivers. A rough benchmark here is 25-30fps for an 800x800 pixel window. Performance is slightly lower in the browser, so the browser version is set to render at a lower resolution.
Some testing was performed on an Intel 530, but the performance is not acceptable at the moment (Will need heavy resolution scaling / a small canvas)
Various sources were used to implement this, but a large credit goes to the book "The Ray Tracer Challenge" by Jamis Buck. I didn't follow it that closely in the end but it's well written, and covers the concepts in a clear manner.