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 http://directxtk.cod...cussions/390346
The sprite png image is from Microsoft XNA Shooter example "player.png"
Any ideas how I can get transparency with DirectXTK?
Thanks!
DirectXTK and PNG transparency
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 http://www.qualibyte.com/pixelformer/
The source images I had were not pre-multiplied.
Found a nice little application that could do the image translation easily http://www.qualibyte.com/pixelformer/
You can also just pass your own blend state to SpriteBatch::Begin if you don't want to use pre-multiplied alpha.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement