Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

Texture Alpha

$
0
0

@davis.jacobj wrote:

I'm trying to set a certain color of my jpg file to be transparent (the white background) and I'm not able to get it to work.

I've tried various permutations of setting the BlendState in the sprite batch begin and various alphas in the color of my spritebatch draw. I can get the image to disappear completely, appear completely or be very bright, like I added a layer of white to it. I'm not able to make only the white background transparent.

I think I may not understand what this operation is really doing to get the desired effect. I did a bunch of googling to no avail. Any suggestions?

I verified that my image actually had a white background by opening it in paintbrush, grabbing a pixel color and seeing that it was 255,255,255.

This is on Windows 10, Visual Studio 2015, MonoGame 3.5

Edit: If I edit the image in GIMP and add an the alpha channel, it works properly with no sprite batch begin settings and using color white in my draw.

Posts: 9

Participants: 5

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles