Pathtracing - How to combine the colors of two or more passes?

Started by
2 comments, last by alvaro 4 years, 6 months ago

I am working on a pathtracer and right now I am struggeling with how to combine the colors after each pass.

Assume, after pass 1 we have Color1 for Pixel (1, 1), after pass 2 we have Color2 for Pixel (1,1) - how should Color1 and Color2 be combined to result in an accurate color?

Advertisement

Usually, just sum up all samples and take the average.

JoeJ is right, but it's important to point out that this needs to be done in "linear space". If you think of colors as the triplets of numbers that we plug into RGB values for a display, the arithmetic doesn't quite work out.

You need to do the computations using numbers that correspond to the physical quantity we care about (I think "luminance" might be the word I should be using, but I'm not an expert and I haven't thought about the details in a really long time). Then you'd use tone mapping to get the RGB values to send to the screen.

 

This topic is closed to new replies.

Advertisement