I am currently trying to implement Jensen's paper on subsurface scattering, but I am getting confused when I am trying to implement it in my pathtracer. I have questions about the data types of certain variables.
- On page 3, $z_r$ is defined as $1 / \sigma_t'$, where $\sigma_t' = \sigma_s' + \sigma_a$. Based on Figure 5, $\sigma_s'$ and $\sigma_a$ are RGB values, which are
Spectrum
types in my pathtracer. However, $z_r$ is expected to be a distance above the surface, which I presume must be a float, not aSpectrum
. How do I handle this discrepancy? Does each RGB wavelength have its own $z_r$? - There is a similar issue in the single scattering term in section 4. $s_o'$ is a distance along the refracted outgoing ray, which is presumably a float. However, the formula for this term uses $\sigma_t$, which is a
Spectrum
. - What about $\sigma_{tr}$? This value is $\sqrt{3\sigma_a\sigma_t'}$. Is this also a
Spectrum
or a float?