Raytracer JS
View this project on GitHub, or try it out.
This is a basic raytracer written in JavaScript. It currently supports spheres and tori, though it can be extended to other shapes too. Lighting is done using the Phong shading model, and surfaces can be reflective. The camera is fixed at the origin. Included here is a demo showing two interlinked tori in two different images with different maximum recursion depths. Allow time for it to render!
Screenshots
To do
- Custom camera position and direction
- Transparency and refraction
- Progressive rendering
- More shapes