Alphamode and Polyvector

Previous topic - Next topic


Not sure if its a bug or my misunderstanding.  Here's my understanding of how alpha mode works in GLB

1) if the alphamode = 0 then it draws the sprite normally (no alpha blending at all and the sprite is 100% visible)
2) if the alphamode > 0 then the sprite is drawn with an additive blend i.e. it will be brighter than normal
3) if the alphamode < 0 then the sprite will be transparent i.e. -0.5 alpha mode means the sprite will be 50% transparent and -1.0 means 100% transparency (so its not visible)

Can some one confirm if this is correct?

OK, so if the above is correct then, an alpha mode of 0.5 means the sprite should be brighter.  However it is actually 50% transparent when used within a polyvector command.  Gernot is there something different we should consider when using alphamode and polyvectors? 




After a quick test the range seems to be when using polyvectors...

1 = sprite at 0% transparency (visible)

down to

0.001 = 100% transparency i.e. invisible sprite.

then back to 0% transparency when the alpha mode = 0.

This means to fade out a sprite I need to change the alphamode from 1 to 0.001 which is different from the manual says.


For 3) -1.0 is visible, -0.001 is (almost) totally invisible.

To fade from visible to invisible you need to go from -1 to -0.001


Thanks for clearing that up.  I guess I had a different idea of how it work.  Logically for me the alpha would be a sliding scale with -1 being invisible through to 0 (the center) being 100% visible, and then onto 1 being double bright. 


It does make things a trifle hard because you can go from normal to 'bright' (0 to 1), but you have to do things backwards when fading...