Skip to content

A pathtracer written in JavaScript, which runs directly in the web browser.

Notifications You must be signed in to change notification settings

helpvisa/js-tracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

js-tracer

A JavaScript-based raytracer that runs in your browser

This project is a reimplementation of my previous raytracer in C#, created in the hopes of making the code more legible, coherent, and usable in a web-based environment.

The limitations of plain JavaScript and scope of the project means that this raytracer, despite its ability to render PBR-based materials, remains single-threaded for the time being. This means high resolutions are likely to make your browser sluggish; 320x240 is recommended for most PCs. WebGL / WebGPU would likely be a better solution for a rewrite in the future than web workers.

You can download the project for yourself and modify index.js to customize the rendered image; work is in progress to allow you to modify the scene setup from the webpage directly. You can save the final image by right-clicking on the on-screen canvas!

Try a render for yourself at this GitHub pages link!

js-tracer in action

This project makes use of the seedrandom.js library, which can be found on GitHub at this link.

About

A pathtracer written in JavaScript, which runs directly in the web browser.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published