Premultiplied alpha and drawing additive sprites

Monkey Forums/Monkey Programming/Premultiplied alpha and drawing additive sprites

Grey Alien(Posted 2014) [#1]
Hi all, so a while ago I asked about if I should premultiply all the pngs I'm using but Mark said no because:

"You don't need to do any alpha pre-multiplication, it's all handled for you behind the scenes.

On iOS, whether or not the image has been 'optimized', or is in the data folder or whatever doesn't matter - the OS always makes sure it's premultiplied when you load it (I guess optimizing makes this step faster)."

Anyway, I've been reliably informed that it should be possible to get "glowing/additive" sprites without using SetBlend(AdditiveBlend), so just using SetBlend(AlphaBlend) instead (this would mean no blend mode changes are required and would speed up mobile rendering). But these people aren't using Monkey and are accessing OpenGL directly.

What they said is when you draw a glowing sprite instead of drawing with colour R*a,G*a,B*a and alpha=a, you just draw with R,G,B and alpha=0. However, this clearly doesn't work in Monkey because SetAlpha(0) will draw the sprite completely transparent. So they must mean setting the colour and alpha somewhere else, but I've no clue what they are on about.

Anyone know?