I developed a custom renderer and ray tracer in pure JavaScript to explore how lighting techniques like ambient occlusion, color bleeding, HDR, and ray-traced shadows work without the use of any graphics APIs.
What I built
The project was built entirely from scratch, including a working renderer that supports hard and soft shadows, high dynamic range lighting, and basic global illumination effects. I experimented with techniques that simulate how light bounces between surfaces and how shadows soften naturally in real life.
Using a ray tracing approach, the system could simulate subtle lighting effects like:
- Ambient Occlusion: Darkening of corners and crevices based on surrounding geometry.
- Color Bleeding: Surfaces reflecting their colors onto nearby objects.
- High Dynamic Range (HDR): Rich lighting based on environmental textures.
- Soft Shadows: Simulating light from broader sources by jittering rays.