diff --git a/src/integrators/path/ptracer.cpp b/src/integrators/path/ptracer.cpp index 5dc4141c..275621f9 100644 --- a/src/integrators/path/ptracer.cpp +++ b/src/integrators/path/ptracer.cpp @@ -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 diff --git a/src/libcore/spectrum.cpp b/src/libcore/spectrum.cpp index 67aa70f3..d8b89e99 100644 --- a/src/libcore/spectrum.cpp +++ b/src/libcore/spectrum.cpp @@ -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); diff --git a/src/librender/scene.cpp b/src/librender/scene.cpp index bc99f592..dbaeed8b 100644 --- a/src/librender/scene.cpp +++ b/src/librender/scene.cpp @@ -410,8 +410,9 @@ 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); + if (medium) + transmittance *= medium->getTransmittance( + Ray(ray, 0, std::min(t, remaining)), sampler); if (!surface) break; @@ -422,7 +423,7 @@ Spectrum Scene::getTransmittance(const Point &p1, const Point &p2, if (remaining > 0) { if (shape->isOccluder()) return Spectrum(0.0f); - else if (shape->isMediumTransition()) + else if (shape->isMediumTransition()) medium = dot(n, d) > 0 ? shape->getExteriorMedium() : shape->getInteriorMedium(); if (++iterations > 100) { /// Just a precaution.. diff --git a/src/librender/skdtree.cpp b/src/librender/skdtree.cpp index ba1c5df7..28256e00 100644 --- a/src/librender/skdtree.cpp +++ b/src/librender/skdtree.cpp @@ -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(temp) + 8, its); n = its.geoFrame.n;