Shaders work in Direct3D but not in DesktopGL

It works fine in DirectX projects.
However, in the DesktopGL project, I get an error at runtime.

Please let me know where I can correct this.

My final target is iOS and Android, but it occurred while trying to create a test environment with DesktopGL first.

Wondering if you got it working. I know there are some tiny adjustments I had to make with DX and DesktopGL versions of my shaders. Wondering which runtime error it showed (sometimes that can be misleading btw).

I was able to solve the problem with the compute shader version you gave me below.

In the official MonoGame version, the presence of “constants used only by pixel shaders” resulted in an error at runtime.
This problem was solved by using the Compute Shader version.

Note that the compute shader version also had some limitations, such as not being able to use arrays, so some tweaking was necessary.

Note that the problem has been resolved for Windows and DesktopGL, but is still trial and error for Android (OpenGL ES).

Ah cool, I’m glad you got it working. Altho I’m wondering: If it’s the " SkinnedModelEffect.fx" file that caused runtime error in desktopGL - it seems a bit strange since I did mine on desktopGL and it worked. I’m not sure what you meant by: “presence of “constants used only by pixel shader”” causing an error since I don’t seem to have encountered that unless I’m misunderstanding something. I guess using ShaderConductor’s the best way to go though since it higher SM’s means more power. :smiley: