Skip to content

Commit e422758

Browse files
committed
Added filter size check
1 parent e59c9d6 commit e422758

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/sensors/radiancemeter.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ MTS_VARIANT class RadianceMeter final : public Sensor<Float, Spectrum> {
7777

7878
if (m_film->size() != ScalarPoint2i(1, 1))
7979
Throw("This sensor only supports films of size 1x1 Pixels!");
80+
81+
if (m_film->reconstruction_filter()->radius() >
82+
0.5f + math::RayEpsilon<Float>)
83+
Log(Warn, "This sensor should be used with a reconstruction filter "
84+
"with a radius of 0.5 or lower (e.g. default box)");
8085
}
8186

8287
std::pair<Ray3f, Spectrum> sample_ray(Float time, Float wavelength_sample,
@@ -119,7 +124,7 @@ MTS_VARIANT class RadianceMeter final : public Sensor<Float, Spectrum> {
119124
ray.o = trafo.transform_affine(Point3f{ 0.f, 0.f, 0.f });
120125
ray.d = trafo.transform_affine(Vector3f{ 0.f, 0.f, 1.f });
121126

122-
// 3. Set differentials; since the film size is always 1x1, we don't
127+
// 3. Set differentials; since the film size is always 1x1, we don't
123128
// have differentials
124129
ray.has_differentials = false;
125130

0 commit comments

Comments
 (0)