Drop in graphical quality after discarding content pipeline

So in a previous thread I asked for advice on whether or not to ditch the content pipeline and just directly import PNG files into my game for graphics. I decided to give it a go and see how I got on. Well after swapping to PNGs for just a couple of assets, I discovered something unexpected. The graphical quality was noticeably lower with PNGs than with XNB files. I’m getting jagged edges.

Does anyone know why this might be?

This is most likely due to transparency. Content processed through the content pipeline by default has its pixels premultiplied. Try setting your BlendState to NonPremultiplied. If you’re using SpriteBatch you can pass a blend state to Begin. MonoGame assumes premultiplied images with its default blend state.


Looks like you’re right. I am able to get a better result by making that change. However, frustratingly it introduces other graphical issues. I have a complex setup involving different things being draw to different render targets and then being combined. I’ll figure it out hopefully, but thanks for giving me an idea of where to focus my attention!

1 Like

I figured it out. Problem solved :slight_smile:

1 Like