I believe LuxRender and SLG2 (pathgpu2) uses the Kelemen-Szirmay style Metropolis light transport algorithm.
In samplers/metrosampler.cpp line 94
and luxrays\samples\smallluxgpu2\pathocl\kernels\pathocl_kernel_samplers.cpp (around) line 193 I have found this:
- Code: Select all
const float dx = s1 / (s1 / s2 + fabsf(2.f * randomValue - 1.f)) - s1 / (s1 / s2 + 1.f);
Two questions:
- is this formula a linear approximation for the s2*exp(-log(...)...) term in the Kelemen paper? [1]
- using the term fabsf(...) instead of randomValue itself is a convolution for the randomValue to alter the distribution?
Also, may I ask how far this implementation is (generally) from the original Kelemen paper?
[1] http://www.iit.bme.hu/~szirmay/paper50_electronic.pdf
