Alpha premultiplication

4 views
Skip to first unread message

Volodymyr Kachurovskyi

unread,
Oct 7, 2009, 11:29:45 AM10/7/09
to pbrt
It looks to me that pbrt premultiplies spectrum values by alpha value
twice.
When a film is written in ImageFilm::WriteImage() method the RGB
values are multiplied by the alpha value. However consider an image
pixel and the film samples in the pixel's filter range. If some of the
camera rays did not hit anything in the scene the corresponding
spectrum values would be black. When filtering film samples these
"black" samples will be added to the final pixel value and thus reduce
the final RGB value. So, the pixel values appear to be *already*
premultiplied by the alpha value (implicitly though). The next
explicit multiplication by the alpha value is therefore incorrect as
it makes those pixels premultiplied by alpha value twice.

I will appreciate if the authors of pbrt could explain me where I am
wrong.

Volodymyr Kachurovskyi

unread,
Oct 13, 2009, 4:15:45 PM10/13/09
to pbrt
Any response?..

On Oct 7, 6:29 pm, Volodymyr Kachurovskyi

Matt Pharr

unread,
Oct 16, 2009, 5:24:48 PM10/16/09
to pb...@googlegroups.com
Yes, I think you are correct. (The alpha handling stuff was always a
little clunky/weird; we actually just chopped it out for the pbrt-v2
release...)

Thanks,
-matt
Reply all
Reply to author
Forward
0 new messages