Inherits: VisualShaderNode < Resource < Reference < Object
A Color operator to be used within the visual shader graph.
Applies operator to two color inputs.
Operator | operator | 0 |
enum Operator:
result = vec3(1.0) - (vec3(1.0) - a) * (vec3(1.0) - b);
result = abs(a - b);
result = min(a, b);
result = max(a, b);
for (int i = 0; i < 3; i++) { float base = a[i]; float blend = b[i]; if (base < 0.5) { result[i] = 2.0 * base * blend; } else { result[i] = 1.0 - 2.0 * (1.0 - blend) * (1.0 - base); } }
result = a / (vec3(1.0) - b);
result = vec3(1.0) - (vec3(1.0) - a) / b;
for (int i = 0; i < 3; i++) { float base = a[i]; float blend = b[i]; if (base < 0.5) { result[i] = base * (blend + 0.5); } else { result[i] = 1.0 - (1.0 - base) * (1.0 - (blend - 0.5)); } }
for (int i = 0; i < 3; i++) { float base = a[i]; float blend = b[i]; if (base < 0.5) { result[i] = base * (2.0 * blend); } else { result[i] = 1.0 - (1.0 - base) * (1.0 - 2.0 * (blend - 0.5)); } }
Default | 0 |
Setter | set_operator(value) |
Getter | get_operator() |
An operator to be applied to the inputs. See Operator for options.
© 2014–2020 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/3.2/classes/class_visualshadernodecolorop.html