Hi Everyone,
I was wondering about how you usually deal with this.
I have a custom node (made with a subgraph) for shadergraph that does an anti aliased step. I’ve defined the input as a float and therefore the input is always cast to a float even if I input a vector4. Ideally I would like the node to accept any incoming vector type (float, vec2, vec3, vec4) and then output the equivalent (the same as the built in nodes like multiply do it).
using the internal CodeFunctionNode class I can do that. But that api is internal (and subject to being deprecated?)
I don’t see how to create such an adaptive slot using shadergraph on the UI level… soo what are my options?
- create 4 step anti aliased nodes, one for each vector size (meehh sucks)
- only create a vector4 version and always cast it to a float, vector2 etc. (or already output the casts from the node and let the shader compiler, hopefully deal with it)
- use the internal api anyway
What is your prefered way of handling this?