I have encountered that if a variable is not used, it is optimized and disappears as input. This is especially hard to overcome when you have a chain of variables and by removing one variable in some arbitrary place, suddenly the whole shader falls apart in a patch. Is there any way to disable this at the shader text level or at the application configuration level? Can I force input variables to appear as inputs? Maybe with some keywords or modifiers?
For example, I would really like to be able to write the inputs, connect everything and then write the shader, not the other way around. Also the first time I experienced it, it took me about twenty minutes to figure out why I didn’t have the input I wanted. It felt like I was doing something wrong, until I realized that it was aggressive optimization.