Previous | Next --- Slide 50 of 56
Back to Lecture Thumbnails
zhengbol

How should we understand the multiplication of two spectrum? (Say, f * Li in the code above)?

intrepidowl

Component-wise (in spectrum.h at least).

intrepidowl

Why do we divide by pdf? Wouldn't we want to multiply by pdf to weight the amount of light received from this direction by the probability of getting a ray from this direction?

keenan

@zhengbol Yeah, exactly: spectra are multiplied component-wise. This is a fairly realistic model for most materials (e.g., incoming light of some frequency gets scattered to light of the same frequency). Some more exotic materials will fluoresce and produce a different color.

keenan

@intrepidowl Because you're sampling in proportion to p. So if, for instance, you're sampling twice as often from a region A than a region B, each individual sample obtained from region A should contribute half as much as those from region B. Otherwise, region A will appear brighter than it really is (since you're picking twice as many samples from there).