Hello MonoGame people!
After migrating from XNA to a MonogameWindows Project I ran into a problem when drawing my geometry.
Geometry gets more and more transparent in the distance, depending on its orientation towards the camera (Triangles directly facing the camera are drawn farther), and on the resolution.
I attached two images showing the same scene but at different resolutions
http://postimg.org/image/r31j30tfj/
http://postimg.org/image/ik959i4gr/
This only occurs in dense geometry, singled out objects are drawn in the distance.
Is there some culling mechanism in MonoGame that wasnt there in XNA?
I’d be very glad if anyone could help me!
I attached a third that shows the orientation differences:
http://postimg.org/image/txu5nwiab/
Sorry for doublePost, but I wasn’t allowed to put three links in one post…
There is nothing special that we do. It looks like it could be something with lighting. Have you tried just rendering diffuse unlit?
I don’t understand what the 3rd image is trying to show.
The third images tries to show that triangles facing the camera are drawn farther away than triangles not facing the camera (e.g. the path gets dark, but the walls in the back are drawn)
I don’t do any fancy lighting or shadowing stuff, my shader is extremely basic. Disabling lighting sadly did not help.
This is extremely weird. Perhaps I should try to convert my project to OpenGL and see if that makes any difference?
Looks like wrong view / projection matrix to me… record video / gif while you are moving around. Also show me your vertex shader.
Okay, so I pulled the thing over to an MonoGame OpenGL game and magic
http://postimg.org/image/mw0w9cvl7/
everything works as it should.
The ShaderCode is completely equal and did work with XNA as well, the only things I’ve changed are
POSITION to SV_Position and the ShaderVersion from 2_0 (XNA and GL) to 5_0 (Dx11)
I’m a little lost…
Okay, so today i came across this report: https://github.com/mono/MonoGame/issues/3972
and it turns out: removing mipmaps from my textures or changing the mipmap filter to NONE fixed my issue in DX as well.
Thank you for your kind support! You will probably hear more annoying questions soon '