Alpha blending causing odd colors

Here are images of what I’m talking about:

The first one is the background I’m using. The second one is the play button I’m exporting. The third one is what it looks like when overlayed and exported using Illustrator. The last one is what I get when I overlay the play button on top of the background. If you click to zoom in, you’ll notice a neon blue outline on the last one. My guess is that it’s due to the way Monogame handles alpha blending when I haven’t specified anything about it. Are there any flags I need to set to have Monogame preform alpha blending the way Illustrator does?

This only happens on Android. It doesn’t happen on a retina iPad, but my guess is that it’s due to the high resolution of the iPad. The lower resolution the Android device is, the more glaring the neon blue outline is.

Thank you.

I had a similar issue in a windows project before, and the solution was setting the blendstate such as this:

GraphicsDevice.BlendState = BlendState.NonPremultiplied;

I hope it’s the same on android… :grimacing:

Yes, that is it! In case anyone is wondering, here’s the code to do it.

spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied);

I’m glad it was helpfull, going to start on android as soon as i get the windows version done :stuck_out_tongue: