Closed tototuo closed 4 years ago
The (discrete coordinates) pixel (5,5) has its center in (continuous coordinates) (5.5, 5.5). Similarly, (4,4) has its center at (4.5, 4.5), and so forth.
Thus, with a filter of radius 1 at pixel (4,4)'s center, the filter covers the box from (3.5,3.5) up to (5.5,5.5) (in continuous coordinates), and thus that sample is inside the filter's extent.
And then similarly for the other pixels.
Does that make sense?
thank you very much. I was just start learning pbrt at that time, and now I'm totally understand, thanks again!
there is one line subtract 0.5 to each sample at filter->addsample
Point2f pFilmDiscrete = pFilm - Vector2f(0.5f, 0.5f);
the description about it is converts the continuous sample coordinates to discrete coordinates but why we should doing this. for example,if we follow the code in pbrt, the sample will contributes to the pixels (4,4), (4,5), (5,4), (5,5). but if we draw these points in a graph, we can conclude that this sample will contributes to the pixels (5,5), (5,6), (6,5) and (6,6)
Does anything get wrong?