mmp / pbrt-v3

Source code for pbrt, the renderer described in the third edition of "Physically Based Rendering: From Theory To Implementation", by Matt Pharr, Wenzel Jakob, and Greg Humphreys.
http://pbrt.org
BSD 2-Clause "Simplified" License
4.87k stars 1.18k forks source link

Possible bug in StratifiedSampler::StartPixel() #225

Closed sriravic closed 5 years ago

sriravic commented 5 years ago

In the StratifiedSampler::StartPixel() routine, where we shuffle the 2D coordinates of the non-array sample vectors (https://github.com/mmp/pbrt-v3/blob/master/src/samplers/stratified.cpp#L54), shouldn't the ndim of this function's argument be 2 instead of being 1 , since we're randomly shuffling the entire 2d sample (the whole dimension)?

sriravic commented 5 years ago

Ah. The Shuffle function employed works with Point2f's instead of raw floats. Hence it's correct for the argument to be 1