Sign in to follow this  
Stuntdk

DirectXTK and PNG transparency

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this