PureBasic Forum

[Solved] Fast Alpha Blending -percent based needed
Page 3 of 3

Author:  wilbert [ Fri May 26, 2017 6:36 am ]
Post subject:  Re: [Solved] Fast Alpha Blending -percent based needed

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.

Page 3 of 3 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group