pathtrace VEX function

Contexts: fog, light, surface

See also: occlusion, irradiance

  1. vector pathtrace(vector P, vector N)

See optional parameters.

pathtrace works like irradiance, but uses the physically based rendering (PBR) engine to do secondary bounces.

pathtrace provides a simple (and not very flexible) method of invoking the PBR rendering engine from micro-polygon rendering. It uses path tracing and the F (BSDF) output, not Cf/Of on the hit shaders. Maximum path depth is controlled by the “diffuse bounces” parameter on the PBR tab of the mantra output driver.

Irradiance caching works the same way it works with occlusion().