Position from Depth, why is Y inverted?

Their is a bit of a difference between GL and DX that monogame doesn’t fully account for essentially you can inadvertently bypass stuff monogame does to smooth it out. Over simplified explanation is that the apparent coordinate system is top left in one and bottom left in the other. The projection matrix aligns things for clip space which has Y extending from -1 to 1 which if flipped results in 1 to -1 y of course however the Z coordinates remain the same. This gets pretty confusing fast.

Basically just think of it like this, on one Y is top down
on the other you have to convert Y = Height - Y to align them;

This is most clearly seen by Global positions on the shader that you don’t alter. Just sending in the mouse coordinates to both a open gl desktop template vs a dx desktop with the exact same code and making a shader that prints out a glow based on that position.
The results will be that one will work as expect and draw your mouse were you expect the other reverse the y position from the bottom left.

I believe the microsoft recommended way to fix it is to negate the view position and alter the vertices winding order so v0 1 2 is v0 2 1 but im not so sure about that.

I think the projection matrix really should handle this and this is the reason the projection matrix allows you to define Top Bottom Left Right but i don’t think its properly implemented to purposely flip it i dunno maybe it is. I seem to remember trying to flip the bottom and top by using it and it didn’t work right.

I usually just wing in a quick fix on the spot were its needed anyways as there are really multiple ways to deal with it and sometimes its just quicker to slop in a bandaid.