+3
Channel select node
This is likely a lower priority thing, but one for the backlog.
I'd love to be able to expose a channel selection node for users of a shader, allowing them to select which texture channel I pull some information from. I often write shaders which expect different information packed into different channels; for instance, a noise function in R, a gradient shade map in G, and a height field in B.
Often this causes the shaders to be hard coded to the specific format your working with, and requires users to magically know this information. In the past, I've solved this by exposing an enumeration to the user (Red = 0, Green = 1, Blue = 2, Alpha = 3) and then just accessed the texture using the array notation myVector4[myEnumVal], which nicely solves this issue.
Anyway, it would be nice to be able to do something like this with shader forge.
I'd love to be able to expose a channel selection node for users of a shader, allowing them to select which texture channel I pull some information from. I often write shaders which expect different information packed into different channels; for instance, a noise function in R, a gradient shade map in G, and a height field in B.
Often this causes the shaders to be hard coded to the specific format your working with, and requires users to magically know this information. In the past, I've solved this by exposing an enumeration to the user (Red = 0, Green = 1, Blue = 2, Alpha = 3) and then just accessed the texture using the array notation myVector4[myEnumVal], which nicely solves this issue.
Anyway, it would be nice to be able to do something like this with shader forge.
Customer support service by UserEcho
float result = SampleTex(myTexure, uv)[myInt];
Unfortunately I don't think there's an easy way to make the material display a nice enum for that in Unity's shader editor. It would likely only be able to show up as an int without writing a custom editor for it (which seems out of scope). So maybe unity's editor structure just makes this too obscure to be useful, beyond adding support for integer types.
In that case, can we get numeric values next to the sliders? I like being able to range limit a value, but then not being able to see it numerically is annoying..
I just haven't found the time for it yet :)
Also for sliders: give them some room aka pixel length.
Often the jumps in numbers are too big when you drag that thing around.