There is some shaders on some games which are mixed with eachother, so if i go into map there might be icons which i don’t want to show as hud, but if you change those it might mess other shaders at other part of game. Could it be possible to get logical shaders, which detects which part of game you are playing, or if you hit that button it changes shaders behauviour to other. Lets say you want to bring up map and you press that M button, then wanted shaders switches their behauviour.
I think the most common use case for a feature like this would be handling a shader differently depending on whether it is used for 2D or 3D drawing. You can already do that with the shader authoring UI by defining a shader as special/non-special depending on the projection matrix (provided the matrix can be evaluated properly which isn’t always the case). If I had to guess, I’d say that covers about 80% of potential uses cases for a feature like this.
However, the way this is implemented allows to theoretically add any number of arbitrary switch conditions, including button states (or the current moon phase ;)), mainly meant for coding game specific conditions if necessary. I’ll keep adding more general, UI exposed switch conditions in mind. IMO that only really makes sense without the need for user interaction though.