Hello everyone.
I’m working on an 80s arcade style game.
When I started I chose the “MonoGame Windows Project” model.
The game is well underway and I would now like to apply a scanline type shader.
I found the “crt-lottes-mg.fx” shader that would do just for me.
The problem is that it seems that this shader is compatible only for OpenGL (DesktopGL, model “MonoGame Cross Platform Desktop Project”).
Is there a possibility to adapt this shader to my project as it is?
Or, is there a scanline type shader suitable for my project?

Yes, I added the fx into the Content Pipeline and when I build the fx directly from the pipeline I get the error
“Shader uses texture addressing operations in a dependency chain that is too complex for the target shader model (ps_2_0) to handle” followed by hundred of “maximum temp register index exceeded” errors. Should I modify the shader? I’m coding my first game after many years and I’m new to MonoGame, C#, and shaders. Just out of curiosity, I also tryed to change the Content Platform property from Windows to DesktopGL and it builds correctly, but when I run the game I get the error “This MGFX effect was built for a different platform!”.

Hmm, I’m not too experienced with shaders either, but… perhaps change the shader model to ps_3_0 instead? Should be doable somewhere inside the shader. Perhaps even ps_4_0'll work too. Just a shot in the dark though.

The shader is just the one I downloaded from https://github.com/Jjagg/mg-crt/blob/81bcf73e02f1087a6223b14aa97145478ead45fd/Game1/Content/crt-lottes-mg.fx.
In the shader code there isn’t any reference to ps_2_0.
These are the first lines of the code, just in case:#if OPENGL#define SV_POSITION POSITION#define VS_SHADERMODEL vs_3_0#define PS_SHADERMODEL ps_3_0#else#define VS_SHADERMODEL vs_4_0_level_9_1#define PS_SHADERMODEL ps_4_0_level_9_1#define HLSL_4#endif
For testing, if I create a “MonoGame Cross Platform Desktop Project” project and add the shader to the Content Pipeline it builds correctly (apart a couple of warnings about negative values). If I create a “MonoGame Windows Project” project and add the shader to the Content Pipeline it doesn’t build. Is it possible that the ps_2_0 model is used by mistake?