Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
VisualShaderNodeColorOp
Hereda: VisualShaderNode < Resource < RefCounted < Object
Un operador Color para ser usado dentro del gráfico de shader visual.
Descripción
Aplica operator a dos entradas de color.
Propiedades
|
Enumeraciones
enum Operator: 🔗
Operator OP_SCREEN = 0
Producir un efecto de pantalla con la siguiente fórmula:
result = vec3(1.0) - (vec3(1.0) - a) * (vec3(1.0) - b);
Operator OP_DIFFERENCE = 1
Produce un efecto de diferencia con la siguiente fórmula:
result = abs(a - b);
Operator OP_DARKEN = 2
Produce un efecto de oscurecimiento con la siguiente fórmula:
result = min(a, b);
Operator OP_LIGHTEN = 3
Produce un efecto de aligeramiento con la siguiente fórmula:
result = max(a, b);
Operator OP_OVERLAY = 4
Produce un efecto de superposición con la siguiente fórmula:
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);
}
}
Operator OP_DODGE = 5
Produce un efecto de evasión con la siguiente fórmula:
result = a / (vec3(1.0) - b);
Operator OP_BURN = 6
Produce un efecto de quemadura con la siguiente fórmula:
result = vec3(1.0) - (vec3(1.0) - a) / b;
Operator OP_SOFT_LIGHT = 7
Produce un efecto de luz suave con la siguiente fórmula:
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);
} más {
result[i] = 1.0 - (1.0 - base) * (1.0 - (blend - 0.5));
}
}
Operator OP_HARD_LIGHT = 8
Produce un efecto de luz suave con la siguiente fórmula:
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);
} más {
result[i] = 1.0 - (1.0 - base) * (1.0 - (blend - 0.5));
}
}
Operator OP_MAX = 9
Representa el tamaño del enum Operator.
Descripciones de Propiedades
Un operador que se aplica a las entradas.