Page 1 of 1

custom node for color math

Posted: Tue Oct 30, 2012 1:33 am
by wretch1958
Is there a node which allows the user to perform a custom function based on 2 RGB input values from different render layers?

For example, "if both pixels are red change to blue otherwise just add" would require a node with a formula:

if R1 == 1 and R2 == 1 and (G1, G2, B1, B2) < .1 then:
(Rout = 0, Gout = 0, Bout = 1)
else:
(Rout = R1 + R2, Gout = G1 + G2, etc...)

If there is no such node could it be programmed?