mirror of
https://github.com/mmp/pbrt-v4
synced 2026-09-26 16:20:07 +03:00
fix: don't accumulate terminated secondary wavelengths to spectral buckets
This commit is contained in:
parent
8c19f30455
commit
5ccdcd06cd
1 changed files with 2 additions and 1 deletions
|
|
@ -447,7 +447,8 @@ class SpectralFilm : public FilmBase {
|
|||
L *= weight * CIE_Y_integral;
|
||||
|
||||
// Accumulate contributions in spectral buckets.
|
||||
for (int i = 0; i < NSpectrumSamples; ++i) {
|
||||
const int numberOfWavelengths = lambda.SecondaryTerminated() ? 1 : NSpectrumSamples;
|
||||
for (int i = 0; i < numberOfWavelengths; ++i) {
|
||||
int b = LambdaToBucket(lambda[i]);
|
||||
pixel.bucketSums[b] += L[i];
|
||||
pixel.weightSums[b] += weight;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue