Skip to content

A ray tracer for the web written entirely in native JavaScript

Notifications You must be signed in to change notification settings

mrushyendra/browser-ray-tracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

A ray tracer written in native JavaScript that should run on any mainstream browser. Features include antialiasing, Fresnel reflection and refraction, texture mapping, glossy reflectance, and multiple geometric primitives at arbitrary positions and orientations. Reads in scene descriptions from json files, and implements an octree to accelerate rendering of primitives.

Sample rendered image

Instructions

  1. Clone the project
  2. Navigate to the folder
  3. Setup a simple local HTTP server python3 -m http.server
  4. Open a web browser and navigate to localhost:<port number>/renderme.html
  5. Upload any sample file from the 'sceneDescriptions' folder
  6. Select 'Render'

To save multiple images of a scene at regular time steps, enter the number of frames you wish to save in the appropriate input box on the page. Note that rendering each frame might take quite while depending on your PC. Once you have rendered an image, refresh the webpage if you wish to render a different image.

About

A ray tracer for the web written entirely in native JavaScript

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published