portsmouth / snelly

A WebGL SDF pathtracer
MIT License
374 stars 24 forks source link

bidirectional pathtracing #4

Open portsmouth opened 7 years ago

portsmouth commented 7 years ago

Only really needed if we implement more general area lighting, in which case scenes with dielectrics generate caustics which don't resolve well in a uni-directional pathtracer.

portsmouth commented 6 years ago

Also needed to render volume caustics properly, e.g. https://www.behance.net/gallery/53917965/LENSES-TEST

Suggest to implement this initially just as an optional mode where we pathtrace backwards from a given laser beam direction, and connect each vertex to a randomly sampled point on the primary ray according to the volume transmittance. This should produce similar

(But cannot include the forward pathtrace simultaneously without properly accounting for MIS, which will probably be too complex).