made with love and rust (compiled to wasm)
Full formulation
Simplified Formulation
To find
the light towards the viewer from a specific point, we sum
the light emitted from such point plus
the integral within the unit hemisphere of
the light coming from any given direction multiplied by
the chances of such light rays bouncing towards the viewer1 and also by
the cosine term/irradiance factor over the normal at the point.2
Note that incoming light is outgoing light from a previous point, making the domain of the integral infinite and the equation recursive. That’s why we cannot analytically solve the rendering equation but instead use Monte Carlo.
Legend (Full formulation)
- - Light leaving point toward the viewer.
- - Light emitted at .
- - Hemisphere of directions around the surface normal.
- - BRDF.
- - Incoming light.
- - Cosine term.
- - Differential solid angle.
Legend (Simplified formulation)
- - Outgoing light.
- - Emitted light.
- - Hemisphere of directions around the normal.
- - BRDF; fraction of incoming light reflected toward the viewer.
- - Incoming light.
- - Cosine term.
- - Differential solid angle.
2. https://en.wikipedia.org/wiki/Rendering_equation
inspiration for this post: https://blog.chuckleplant.com/2017/05/28/light-shafts.html