SpriteBlendingMode() combination question

Just starting out? Need help? Post your questions and find answers here.
Carm3D
Enthusiast
Enthusiast
Posts: 103
Joined: Mon Feb 17, 2025 10:04 am

SpriteBlendingMode() combination question

Post 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?
Carm3D
Enthusiast
Enthusiast
Posts: 103
Joined: Mon Feb 17, 2025 10:04 am

Re: SpriteBlendingMode() combination question

Post by Carm3D »

I got it sorted.. The problem is I didn't add Sprite Blending Mode when loading the sprite. Sheesh.
Carm3D
Enthusiast
Enthusiast
Posts: 103
Joined: Mon Feb 17, 2025 10:04 am

Re: SpriteBlendingMode() combination question

Post 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.
Post Reply