From 77d0885f8584547251a80cdc3d225282593917ae Mon Sep 17 00:00:00 2001 From: Lin Hsu <475936052@qq.com> Date: Wed, 6 Sep 2017 20:46:17 +0800 Subject: [PATCH] src/librender/sensor.cpp, pdfTime(), check of validity of ray.time (#12) --- src/librender/sensor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librender/sensor.cpp b/src/librender/sensor.cpp index 7869e905..82483108 100644 --- a/src/librender/sensor.cpp +++ b/src/librender/sensor.cpp @@ -132,7 +132,7 @@ Spectrum Sensor::sampleRayDifferential(RayDifferential &ray, } Float Sensor::pdfTime(const Ray &ray, EMeasure measure) const { - if (ray.time < m_shutterOpen || ray.time > m_shutterOpenTime + m_shutterOpenTime) + if (ray.time < m_shutterOpen || ray.time > m_shutterOpen + m_shutterOpenTime) return 0.0f; if (m_shutterOpenTime == 0 && measure == EDiscrete)