Javascript RayTracer

Use Workers
Current Scene: Ray


This was the main project for my Computer Graphics 2 class. We were tasked with simply creating a Ray tracer that could duplicate the famous Turner Whitted image. I chose to write mine in Javascript since it seemed like more of a challenge with no accelerated graphics systems to rely on. The original was a single thread system that drew the scene by row. After the class was over I went back and wrote in a threaded solution using HTML5's WebWorkers. You will notice that there are some artifacts around the edges of the spheres. Those are generated due to precision errors in Javascript's number system. I would like to eventually go back and fix this since WebGL allows for proper datatypes.


  • Scene Graph
  • UVN Camera Model
  • Blinn-Phong Lighting Model
  • Light Transmission & Reflection
  • Multi-threaded - WebWorkers
  • WAVEOBJ 3D Models
  • Custom Shader Library