Jonathan Olson

I wanted to test out WebGL's capabilities for path tracing after viewing Evan Wallace's path tracer, but with more features and corrected realism/gamma.

Rays are fired from the camera out into the scene, bounce around according to physical models, and record when they hit a light source. Whenever anything changes, the scene has to be re-traced (it starts out noisy, but converges to the correct image).

Try out the demo!

View of spheres of different materials, over a wooden floor

It includes full fresnel simulation of dielectrics, depth of field tone mapping, and caustics, but not spectral or polarized light. Spectral is generally supported, but the environment maps don't have spectral data.

Caustics and tone mapping
Caustics and tone mapping
Bump mapping and procedural BRDFs
Bump mapping and procedural BRDFs

Projections

It is capable of different projections:

Stereographic projection
Stereographic projection
Orthographic projection
Orthographic projection

Signed Distance Fields (SDFs)

I also experimented with signed distance fields (SDFs) based on Inigo Quilez's work. It included modeling an IKEA Pokal glass as a single formula.

Cross section view of the glass SDF
Cross section view of the glass SDF
Opaque black view of the glass
Opaque black view of the glass
Normal rendering of the glass
Normal rendering of the glass

Procedural Texturing

I also experimented with using the projection of a dodecahedron to bump-map/texture a soccer ball.

Dodecahedron-based procedural bump mapping and texturing of a sphere to look like a soccer ball
Dodecahedron-based procedural bump mapping and texturing of a sphere to look like a soccer ball