PDA

View Full Version : floating point buffers and color clamping



Ehsan Kamrani
02-24-2007, 03:12 AM
Hi
All the values in my graphic engine lie in the range[0,1].So has it worth to disable color clamping when all the values are in this range?
-Ehsan-

ZbuffeR
02-24-2007, 04:25 AM
Sometimes yes : imagine you blend three layers :
(A + B + C ) / 3
With clamping, if A and B are above 0.5, the intermediate sum will be clamped too, then after adding C and doing the divide the end result is different than the ideal operation.

It is a speed/quality tradeoff :)