mirror of
https://github.com/mmp/pbrt-v4
synced 2026-09-26 16:20:07 +03:00
Fix radiance scaling in SpectralFilm::AddSample
This commit is contained in:
parent
db13bdc27d
commit
4f99059725
1 changed files with 8 additions and 1 deletions
|
|
@ -414,7 +414,14 @@ class SpectralFilm : public FilmBase {
|
|||
if (m > maxComponentValue)
|
||||
L *= maxComponentValue / m;
|
||||
|
||||
L = weight * SafeDiv(L, lambda.PDF());
|
||||
// The CIE_Y_integral factor effectively cancels out the effect of
|
||||
// the conversion of light sources to use photometric units for
|
||||
// specification. We then do *not* divide by the PDF in |lambda|
|
||||
// but take advantage of the fact that we know that it is uniform
|
||||
// in SampleWavelengths(), the fact that the buckets all have the
|
||||
// same extend, and can then just average radiance in buckets
|
||||
// below.
|
||||
L *= weight * CIE_Y_integral;
|
||||
|
||||
DCHECK(InsideExclusive(pFilm, pixelBounds));
|
||||
Pixel &pixel = pixels[pFilm];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue