[Cg1] RGBColor::clamp()

Elena Arabadzhiyska s9elarab at stud.uni-saarland.de
Fri Jan 9 17:44:10 CET 2015

Dear students,

RGBColor::clamp() is used to clamp the color values in image.cpp when  
saving the final image. If you use a GUI library you may want to call  
the method in your visualizer as well but only there.  
RGBColor::clamp() is NOT to be used while rendering your image, let  
alone in your integrators. This results in under-estimated light  
contribution. Clamping is needed only because our monitors cannot  
display the entire dynamic range of the rendered images.

I am sending this e-mail because this appears to be the most common,  
persistent and time-consuming mistake.

Best wishes,

More information about the Cg1 mailing list