Monogame Content Builder "defines"

As is common knowledge throughout this project, Windows shaders need to be built with Shader Model 4, whereas OpenGL needs 2 or 3. In solving this discrepancy, I see resources pointing to a conditional compilation, like

#ifdef SM4

And that seems to work. So no problem there.
My question, though, is one of general comprehension. Whence does this SM4 definition originate? Is this a symbol that’s hard coded in the Windows platform specification, or is SM4 an arbitrary symbol defined in the project settings or code somewhere? I originally tried solving this with my own symbols, but nothing worked until I used SM4 specifically.

There’s a list of preprocessor defines here: https://docs.monogame.net/articles/content/custom_effects.html#effect-writing-tips

They are hardcoded.

1 Like

Okay, that’s all, thanks!

1 Like