Skip to main content
6 events
when toggle format what by license comment
May 25, 2019 at 18:52 comment added MarcClintDion Comment on old threads all you want, it's not an offense. Your point is valid especially with shaders. I use 1-x in GLSL as well. It slipped past me here, thanks for pointing it out.
May 9, 2019 at 16:33 comment added Joseph Brandenburg This is a really old thread, but I want to add a little correction: the best way to invert a color/alpha value is to simply subtract it from one. It's actually the same math, x*-1 + 1 = 1-x, but one fewer calculation can save time. I do this a lot in shaders, where performance does matter.
Aug 22, 2014 at 0:50 vote accept GiantCowFilms
Aug 21, 2014 at 19:08 history edited MarcClintDion CC BY-SA 3.0
added 147 characters in body
Aug 21, 2014 at 18:56 history edited MarcClintDion CC BY-SA 3.0
added 179 characters in body
Aug 21, 2014 at 18:46 history answered MarcClintDion CC BY-SA 3.0