VisualShaderNodeFloatOp
继承: VisualShaderNode
< Resource
< RefCounted
< Object
A floating-point scalar operator to be used within the visual shader graph.
描述
Applies operator
to two floating-point inputs: a
and b
.
属性
枚举
enum Operator:
Operator OP_ADD = 0
Sums two numbers using a + b
.
Operator OP_SUB = 1
Subtracts two numbers using a - b
.
Operator OP_MUL = 2
Multiplies two numbers using a * b
.
Operator OP_DIV = 3
Divides two numbers using a / b
.
Operator OP_MOD = 4
Calculates the remainder of two numbers. Translates to mod(a, b)
in the Godot Shader Language.
Operator OP_POW = 5
Raises the a
to the power of b
. Translates to pow(a, b)
in the Godot Shader Language.
Operator OP_MAX = 6
Returns the greater of two numbers. Translates to max(a, b)
in the Godot Shader Language.
Operator OP_MIN = 7
Returns the lesser of two numbers. Translates to min(a, b)
in the Godot Shader Language.
Operator OP_ATAN2 = 8
Returns the arc-tangent of the parameters. Translates to atan(a, b)
in the Godot Shader Language.
Operator OP_STEP = 9
Generates a step function by comparing b
(x) to a
(edge). Returns 0.0 if x
is smaller than edge
and otherwise 1.0. Translates to step(a, b)
in the Godot Shader Language.
Operator OP_ENUM_SIZE = 10
Represents the size of the Operator enum.
属性说明
Operator operator = 0
An operator to be applied to the inputs. See Operator for options.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。