[SOLVED] Effect parameter not being set in OpenGL, however works in DirectX project

Yep, I’d recommend trying that, or commenting out the WorldViewProjection parameter entirely if it’s unused.

This reminds me of this issue that I and several other users have run into.

I don’t remember all the details of the issue, but basically the shader compiler will aggressively remove unused parameters (or even unused individual columns of matrix parameters). However MonoGame isn’t made aware of this, so it will still pass parameters by index in the original order. So if your WorldViewProjection is unused, then when you set WorldViewProjection from code, it’s probably actually using the first column (or maybe first row?) to set swizzle.

1 Like