For a couple of reasons I was thinking the best way was to add it as a list of parameter names in the preset. This way you can control which parameters appear per preset.
If you have a shader with lots of variations and reused code like the Mega Bezel it’s important to be able to control this from the preset.
The core reason for this is because during loading/compilation the pragma stage comes before the #defines, so you can’t #ifdef a #pragma parameter.
So this would allow you to set values and hide the parameters in the preset for things the user is never supposed to access, either because the parameters aren’t used for the particular variation of the shader, or they define basic operation of the shader for this preset which shouldn’t be changed by the user.
As an example, imagine that your base shader was a multifunctional crt shader. The multifunctional nature of it means that some parameters are only used by one use case of the shader, E.G. Aperture grille vs Slot mask. You would make 2 presets which use the base shader, and hide the parameters that are not used for the use case, so no slot mask parameters in the aperture grille preset and vice versa.