Reputation: 26505
I need SpriteBatch
to render images how I would expect in WPF or a normal UIKit app:
Color.White
and modifying the A
value.Closest has been using BlendState.NonPremultiplied
, but I get weird lines where partially transparent PNGs overlap on one another.
I was having similar issues on Windows (see here), but fixed it by changing the Premultiplied
setting in the XNA content project. How can I do similar for MonoGame? (I'm expecting there is a difference in OpenGL here)
Upvotes: 0
Views: 4102
Reputation: 26505
We solved it by using two different setups.
On Windows and XNA:
BlendState.NonPremultiplied
Color.White
and set A
valueOn MonoGame and iOS:
BlendState.AlphaBlend
Color.White * (float)Alpha / (float)byte.MaxValue
My PNGs are not pre-multiplied and are used exactly as you'd expect coming out of Photoshop.
Upvotes: 1