提交 07d4749c 编写于 作者: M Matt Pharr

Fix bug in RNG seeding in wavefront integrator.

Partially seeding an RNG using just ray direction is risky business with an
orthographic camera. Things go extra bad when the object enclosing the
medium has camera-axis aligned planes in which case doing the rest of the
RNG seeding with tMax to the intersection point rounds out the borkage.

Fixes #175.
上级 36525781
......@@ -41,7 +41,7 @@ void WavefrontPathIntegrator::SampleMediumInteraction(int wavefrontDepth) {
SampledSpectrum inv_w_u = w.inv_w_u;
SampledSpectrum inv_w_l = w.inv_w_l;
SampledSpectrum L(0.f);
RNG rng(Hash(tMax), Hash(ray.d));
RNG rng(Hash(ray.o, tMax), Hash(ray.d));
PBRT_DBG("Lambdas %f %f %f %f\n", lambda[0], lambda[1], lambda[2], lambda[3]);
PBRT_DBG("Medium sample beta %f %f %f %f inv_w_u %f %f %f %f inv_w_l %f %f "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册