

### Author Topic: Alphamode and Polyvector  (Read 592 times)

#### Uncle

• Mr. Drawsprite
• Posts: 75
##### Alphamode and Polyvector
« on: 2009-Sep-20 »
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?

Cheers,

Andrew

UPDATE :

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.
« Last Edit: 2009-Sep-20 by Uncle »

• HelpEditors
• Prof. Inline
• Posts: 5657
• Its me!
##### Re: Alphamode and Polyvector
« Reply #1 on: 2009-Sep-20 »
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

#### Uncle

• Mr. Drawsprite
• Posts: 75
##### Re: Alphamode and Polyvector
« Reply #2 on: 2009-Sep-20 »
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.