fixed a stupid bug that could mess up medium rendering with analytic shapes
parent
33a6fd58c0
commit
4ed86ec392
|
@ -32,7 +32,7 @@ MTS_NAMESPACE_BEGIN
|
|||
* For practical reasons, the integral is simultaneously computed
|
||||
* for every pixel on the image plane. This is done similarly to
|
||||
* path tracing with next event estimation (PTNEE) by tracing a
|
||||
* shadow ray at every surface/volume interaction.
|
||||
* shadow ray to the camera at every surface/volume interaction.
|
||||
* An independent accumulation buffer will be assigned to each
|
||||
* processor so that the rendering process can run in parallel.
|
||||
* When a perspective camera is used, the importance distribution
|
||||
|
|
|
@ -444,7 +444,7 @@ Float ProductSpectrum::eval(Float lambda) const {
|
|||
return m_spec1.eval(lambda) * m_spec2.eval(lambda);
|
||||
}
|
||||
|
||||
Float RayleighSpectrum::eval(Float lambda) {
|
||||
Float RayleighSpectrum::eval(Float lambda) const {
|
||||
Float lambdaSqr = lambda*lambda;
|
||||
|
||||
return 1.0f / (lambdaSqr*lambdaSqr);
|
||||
|
|
|
@ -411,7 +411,8 @@ Spectrum Scene::getTransmittance(const Point &p1, const Point &p2,
|
|||
bool surface = rayIntersect(ray, t, shape, n);
|
||||
|
||||
if (medium)
|
||||
transmittance *= medium->getTransmittance(Ray(ray, 0, std::min(t, remaining)), sampler);
|
||||
transmittance *= medium->getTransmittance(
|
||||
Ray(ray, 0, std::min(t, remaining)), sampler);
|
||||
|
||||
if (!surface)
|
||||
break;
|
||||
|
|
|
@ -164,6 +164,7 @@ bool ShapeKDTree::rayIntersect(const Ray &ray, Float &t, ConstShapePtr &shape, N
|
|||
} else {
|
||||
/// Uh oh... -- much unnecessary work is done here
|
||||
Intersection its;
|
||||
its.t = t;
|
||||
shape->fillIntersectionRecord(ray,
|
||||
reinterpret_cast<const uint8_t*>(temp) + 8, its);
|
||||
n = its.geoFrame.n;
|
||||
|
|
Loading…
Reference in New Issue