• Advertisement
Sign in to follow this  

DirectXTK and PNG transparency

This topic is 1868 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,

I am trying out the Spritebatch function in DirectXTK, but I am having problems with transparency in .png images.
My code is based on a stripped down version of this example [url="http://directxtk.codeplex.com/discussions/390346"]http://directxtk.cod...cussions/390346[/url]

The sprite png image is from Microsoft XNA Shooter example "player.png"

Any ideas how I can get transparency with DirectXTK?

Thanks!

Share this post


Link to post
Share on other sites
Advertisement
I have found out why I had this problem, turns out that DirectXTK Spritebatch expects an image with pre-multiplied alpha.
The source images I had were not pre-multiplied.

Found a nice little application that could do the image translation easily [url="http://www.qualibyte.com/pixelformer/"]http://www.qualibyte.com/pixelformer/[/url]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement