src/pbrt/cpu/integrators.cpp: RayIntegrator::EvaluatePixelSample(): previously when cameraRay not generated, the debug infomation logging macro could never be reached, because it is in a if (cameraRay) block. So I rearrange a bit to have this function return early, after printing out debug information, when no cameraRay generated.
also in src/pbrt/cpu/integrators.cpp, in function RayIntegrator::EvaluatePixelSample() and LightPathIntegrator::EvaluatePixelSample(), there are 2 pieces of identical code (line 230 and line 513):
Float lu = sampler.Get1D();
if (Options->disableWavelengthJitter)
lu = 0.5;
sampler.Get1D() is invoked even it is not used (when Options->disableWavelengthJitter evaluated to true). So I delete it for such cases:
Float lu = Options->disableWavelengthJitter ? 0.5 : sampler.Get1D();
Similar to the 2nd change, src/pbrt/samplers.hGetCameraSample(): when GetOptions().disablePixelJitter evaluated to true, 2 2DSample and 1 1DSample are generated. I have them deleted to save several samples for later usage.
There are 3 changes, each in 1 commit:
src/pbrt/cpu/integrators.cpp
: RayIntegrator::EvaluatePixelSample(): previously whencameraRay
not generated, the debug infomation logging macro could never be reached, because it is in a if (cameraRay) block. So I rearrange a bit to have this function return early, after printing out debug information, when no cameraRay generated.also in
src/pbrt/cpu/integrators.cpp
, in functionRayIntegrator::EvaluatePixelSample()
andLightPathIntegrator::EvaluatePixelSample()
, there are 2 pieces of identical code (line 230 and line 513):sampler.Get1D()
is invoked even it is not used (whenOptions->disableWavelengthJitter
evaluated to true). So I delete it for such cases:Similar to the 2nd change,
src/pbrt/samplers.h
GetCameraSample(): whenGetOptions().disablePixelJitter
evaluated to true, 22DSample
and 11DSample
are generated. I have them deleted to save several samples for later usage.