I have a shader where I’d like sometimes to add an “alpha” parameter to adjust the alpha output. Would it make sense to have this effect implemented as a shader node, so that I can plug it in when needed without altering the original shader?
Thanks!
To clarify: this is intended to be used with my spritesheet shader.
You cannot use a shader node if your original shader is not all made of shader nodes.
Also you cannot plug in a shader node into a material definition at runtime for now, because there are no API to do this. (actually there is, but they are not super user firendly).
What youcan do though is to associate a define with a material parameter (like UseAlpha for example) that would “activate” some part of your shader code.