Page 3 of 3

Re: [Solved] Fast Alpha Blending -percent based needed

Posted: Fri May 26, 2017 6:36 am
by wilbert
Michael Vogel wrote:yep, but I thought a floating point would slowing it down. More surprising is, why 'n*255/100' is faster than 'n*255 : n/100' and why the same formula is done quicker outside the procedure than inside?!
Floats aren't slow :)

And n = n*255/100 is faster as n = n*255 : n = n/100 because it's less work to do it at once compared to storing the result in between.