Facepunch / sbox-issues

177 stars 12 forks source link

[Shader Graph] Gradient Node #3178

Open QuackCola opened 1 year ago

QuackCola commented 1 year ago

For?

S&Box, Other

What can't you do?

Unable to specify a more complex color gradient unless I fiddle with a bunch of other nodes to get the desired result. And even then that's only really suitable for simple color gradients. A much-preferred way to specify one in the Shader Graph would be in a node with a provided gradient property editor.

How would you like it to work?

A node with a gradient property editor where you of course specify different keys to customize your gradient and the ability to set the mode of the gradient. Being able to expose it to the material editor would be nice too if doable.

And another node to sample the incoming gradient perhaps?

What have you tried?

For a simple two-color Gradient

You can get a simple UV gradient from a texcoords node by masking out the desired channel and using a lerp between two colors.

Node Setup SimpleGradient.txt

but for a more complex gradient, this kind of method isn't really that suitable as I've stated before.

Additional context

No response

eEight-dev commented 7 months ago

Bump, I bet a lot of people could get great use out of something like this!

ShadowBrian commented 5 months ago

Bump, I bet a lot of people could get great use out of something like this!