Skip to content
gh-pages
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

readme.md

JavaScript Path Tracer

A very simple path tracer in the browser with zero dependencies.

Path tracing is a technique that simulates the behavior of light to render photorealistic images:

output

Scenes

Features

  • Unbiased monte carlo integration
  • Adaptive sampling
  • Russian roulette
  • Physically based materials
    • Fresnel reflection, transmission, absorption, diffusion
    • Color, index of refraction, gloss, transparency, separate fresnel channels, metals
  • Arbitrary light sources
  • Physically based camera
    • sensor, aperture, focus, depth of field
  • Antialiasing
  • Spherical environment maps

Code

The renderer is about 430 lines written for readability, not terseness. The core components of any monte carlo path tracer are its trace function and Bidirectional Scattering Distribution Function (bsdf).

Running locally

$ git clone https://github.com/hunterloftis/pathtracer.git
$ cd pathtracer
$ yarn install
$ yarn start
$ open localhost:8000

About

A simple, naive path tracer in JavaScript

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.