#How to isolate pixels/colors in shadergraph

1 messages · Page 1 of 1 (latest)

gleaming agate
#

i've been trying to find a nice and clean way to take only this green color from this (it wont always be green) but i plan to take only this green part and put it on top of the rest of the shader.

i feel like if i simply use an Add node, it would literally add that color ontop of the other color and does not give me the exact color i need.

gleaming agate
#

would lerp make sure the white part doesn't get put ontop of the rest of the shader?

umbral ore
#

Depends what you mean by "put ontop of"

#

Add does an addition operation on the color values

#

Lerp is linear interpolation

#

If you interpolate fully to another color, there's no original color remaining at all

mortal narwhal
#

Lerp is the way

#

Otherwise you need to multiply both sides with some alpha and then add the results together

gleaming agate
#

🤔 i'll give it a shot

mortal narwhal
#

As long as you can get a "mask" value from 0-1 then you can achieve this

gleaming agate
#

yeah that's the concern i was having. trying to find out how to properly mask to isolate/separate that one part so it doesn't add the unecessary parts on top of it

#

here's a gif showing what's happening

#

my intention was for the green to be put on top of the blue without carrying the white over as well

gleaming agate
#

i think i got it figured out

#

i did not realize when using lerp, the color black can be used as a way to mask out things and white being the opposite.

#

i'll have to remember this because i will be doing this alot