About 10 years ago I wrote a very simple realtime raytracer in C++. It was very slow, I remember I could get decent speeds only when running on very low resolutions (like 320x240).
Last year I was curious to see how a current CPU can handle the same workload. I modified my old code in order to enable multithreading, this way I was able to put in use all the logical cores of my Core i7.
It ran a lot better, but it was still quite slow when running at high resolutions.
My latest HTML5 experiment is inspired by this old raytracer. I'ts not exactly the same code, as I had to rewrite it as a GLSL shader, but it's very close. The result is realtime raytracing running on the GPU, inside a browser.
This version is finally fast enough also at the highest resolutions, on my ATI 5770 I get 60 frames per second with a GPU load of about 35%.
If you have a recent browser and video card you can watch in your browser this experiment featuring realtime raytracing (on the GPU) of 6 spheres and 4 point-lights with shadows.
Here you can also see a video conversion of the same experiment:
Last year I was curious to see how a current CPU can handle the same workload. I modified my old code in order to enable multithreading, this way I was able to put in use all the logical cores of my Core i7.
It ran a lot better, but it was still quite slow when running at high resolutions.
My latest HTML5 experiment is inspired by this old raytracer. I'ts not exactly the same code, as I had to rewrite it as a GLSL shader, but it's very close. The result is realtime raytracing running on the GPU, inside a browser.
This version is finally fast enough also at the highest resolutions, on my ATI 5770 I get 60 frames per second with a GPU load of about 35%.
If you have a recent browser and video card you can watch in your browser this experiment featuring realtime raytracing (on the GPU) of 6 spheres and 4 point-lights with shadows.
Here you can also see a video conversion of the same experiment: