Opacity Problems

Previous topic - Next topic

Thunor

Hi

I've been playing around with GLBasic with the intention of entering into the GP2X competition. I see that GLBasic supports RGBA images and I was intending on using this feature so that I could animate sprites over complicated backgrounds, but I am not getting the same results as using pre-rendered images. For example I created this image in Macromedia Fireworks, the top image having 100% opacity, the second 60% opacity, the third 40% opacity and the fourth 20%.



The following image is a screen-shot of GLBasic rendering "Testing..." over a patterned background. "Testing..." is a png32 RGBA image, 100% opaque with a transparent background and a black glow and loaded using LOADSPRITE. The top sprite uses ALPHAMODE -1, the second ALPHAMODE -0.6, the third ALPHAMODE -0.4 and the fourth ALPHAMODE -0.2.



So am I doing something wrong?

Regards.

P.S. The forum is reducing the size of the images above so right-click and select View Image to see them full size.

Moru

Try a positive Alpha value and see what you get.

Thunor

Quote from: MoruTry a positive Alpha value and see what you get.
I tried that but it makes the image brighter.

ALPHAMODE is good for a simulated mouse pointer shadow but I've decided to use pre-rendered images over a plain background.

Tack

Moru

Ok, was just an idea, haven't played around much with it yet :-)


Varsågod :-)

Kitty Hello

Can you upload the "testing" image, please?

Thunor


Kitty Hello

OK.
There's 2 things here.
First, GP2X/PocketPC/X-Box Linux do not support alpha-values in images. Only transparent, or opaque. Thus, the result might slighty differ from what you expect. No big deal, though.

Second, my appologies. Oh feel so dull. You discovered a bug that is in for about 7 years now. With alpha blending, I also faded colors to grey. I so, so apologize. (Look at all the colors on the wall... :happy:)

I fixed it, but I take some time to upload an update. It's so deep, I have to really really check if everything's working, still.

Thank you so much for finding this one.