How costly is Fog?
C = f * Ci + (1 - f) Cf
In RGBA mode, done for R,G,B (does not affect A) so:
Each R,G,B component => 2 mults, 1 add
(1-f) is actually one’s complement of f if using 0.8 representation, so does not take a subtraction
Total is 6 mults, 3 adds
Previous slide
Next slide
Back to first slide
View graphic version