Shader conversion from XNA to Monogame

I converted the microsoft XNA Particle3DSample project to Monogame and i got everything running without any large changes other than the shader and the C# vertex declaration.
After running a rendering comparison to the XNA version, i noticed that whenever a texture has any alpha blending, it is rendered differently.

The BlendState in Monogame is set as BlendState.NonPremultiplied.
The main code difference the conversion of the shader from shader model 2 to 5, so the problem must be the that they handle alpha blending differently by default.

I have tried removing parameters from the shader and comparing the two version again, and i’ve made sure must be in this line “Texture.Sample(Sampler, input.TextureCoordinate)”.

Here is the problem: Monogame (left/above) alpha blending is wrong, while XNA (right/bottom) is like it’s supposed to be.

Monogame shader:
https://pastebin.com/qZBLsMt3

XNA shader:
https://pastebin.com/zkrNsTQz

Thanks.

Did you set premultiplyalpha in the pipeline tool?
It must match what you plan to use in your game

No i did not, the default settings are on.
I’ll try to see if that is the problem later.
Thanks.

It works.
Thanks you.

You’re welcome :wink: no pb.