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
Eredita: VisualShaderNode < Resource < RefCounted < Object
Un operatore Color da utilizzare all'interno del grafico di shader visivo.
Descrizione
Applica operator a due ingressi di colore.
Proprietà
|
Enumerazioni
enum Operator: 🔗
Operator OP_SCREEN = 0
Produce un effetto schermo con la seguente formula:
result = vec3(1.0) - (vec3(1.0) - a) * (vec3(1.0) - b);
Operator OP_DIFFERENCE = 1
Produce un effetto differenza con la seguente formula:
result = abs(a - b);
Operator OP_DARKEN = 2
Produce un effetto scurente dalla seguente formula:
result = min(a, b);
Operator OP_LIGHTEN = 3
Produce un effetto schiarente dalla seguente formula:
result = max(a, b);
Operator OP_OVERLAY = 4
Produce un effetto sovrapposizione con la seguente formula:
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
Produci un effetto evasione con la seguente formula:
result = a / (vec3(1.0) - b);
Operator OP_BURN = 6
Produce un effetto bruciatura con la seguente formula:
result = vec3(1.0) - (vec3(1.0) - a) / b;
Operator OP_SOFT_LIGHT = 7
Produce un effetto luce soffusa con la seguente formula:
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));
}
}
Operator OP_HARD_LIGHT = 8
Produce un effetto luce intensa con la seguente formula:
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));
}
}
Operator OP_MAX = 9
Rappresenta la dimensione dell'enumerazione Operator.
Descrizioni delle proprietà
Un operatore da applicare agli ingressi.