Page 1 of 1

SpriteBlendingMode() combination question

Posted: Tue May 13, 2025 10:01 pm
by Carm3D
Image showing the issue:
http://www.carm3d.com/PureBasicForum/Po ... aIssue.jpg

I'm having trouble getting my sprite to look right in PureBasic. Right now it looks like it is on the left.. Opaque. I've been experimenting with various SpriteBlendingMode() options, but there are so many possibilities. Sometimes I see graphic elements behind it, but the background takes on the colour of the sprite color. Would anyone know the best comination of SpriteBlendingMode() for this stype of sprite?

Re: SpriteBlendingMode() combination question

Posted: Wed May 14, 2025 1:04 am
by Carm3D
I got it sorted.. The problem is I didn't add Sprite Blending Mode when loading the sprite. Sheesh.

Re: SpriteBlendingMode() combination question

Posted: Wed May 14, 2025 1:13 am
by Carm3D
In my humble opinion, this should be added to the documentation in the SpriteBlendingMode() page:

Important: For SpriteBlendingMode() to work with transparent sprites, the sprite must be loaded with #PB_Sprite_AlphaBlending. Otherwise, alpha channel data will be ignored upon loading.

This would have saved me hours of hunting. It will probably save others hours as well.