Logic for ShaderGeneric

Can someone share how to do logic for ShaderGeneric signal? Like to treat it like a scalar or boolean.
For example, doing IF, equals, less or greater logic to an output of distance patch from camera texture and delay frame where it produced a white vector with alpha. What I want to do is to treat where it’s white is equal 1 to drive a if patch or pulse to save value for something to happen or even exponential smoothing. is there a way to do that using math patches? because it doesn’t work with logic patch.

1st option, do it in Spark SL.
2nd Option, you can use step patch to replace greater than patch to compare if a shader signal is over a threshold. Then use a mix patch to use it as an alpha to determine the mix of colours/texture to send to the material.

You can’t use logic patch directly on shader signal because it is essentially a different system as scalar/number system. It’s like two languages where the logic patch can only be used in language 1(scalar) but not language 2(shaders).

4 Likes

Thank you so much @BoonJun !!!