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
Наследует: VisualShaderNode < Resource < RefCounted < Object
Оператор Color, который будет использоваться в графе визуального шейдера.
Описание
Применяет operator к двум цветовым входам.
Свойства
|
Перечисления
enum Operator: 🔗
Operator OP_SCREEN = 0
Создайте эффект экрана с помощью следующей формулы:
result = vec3(1.0) - (vec3(1.0) - a) * (vec3(1.0) - b);
Operator OP_DIFFERENCE = 1
Создайте эффект разницы с помощью следующей формулы:
result = abs(a - b);
Operator OP_DARKEN = 2
Создайте эффект затемнения с помощью следующей формулы:
result = min(a, b);
Operator OP_LIGHTEN = 3
Создайте эффект осветления с помощью следующей формулы:
result = max(a, b);
Operator OP_OVERLAY = 4
Создайте эффект наложения с помощью следующей формулы:
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
Создайте эффект уклонения с помощью следующей формулы:
result = a / (vec3(1.0) - b);
Operator OP_BURN = 6
Создайте эффект горения с помощью следующей формулы:
result = vec3(1.0) - (vec3(1.0) - a) / b;
Operator OP_SOFT_LIGHT = 7
Создайте эффект мягкого света с помощью следующей формулы:
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
Создайте эффект жесткого света с помощью следующей формулы:
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
Представляет размер перечисления Operator.
Описания свойств
Оператор, применяемый к входным данным.