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...
VisualShaderNodeSmoothStep¶
继承: VisualShaderNode < Resource < RefCounted < Object
在可视化着色器图中计算 SmoothStep 函数。
描述¶
翻译为着色器语言中的 smoothstep(edge0, edge1, x)
。
如果 x
小于 edge0
则返回 0.0
;如果 x
大于 edge1
则返回 1.0
。否则,返回值使用 Hermite 多项式在 0.0
和 1.0
之间进行插值。
属性¶
|
枚举¶
enum OpType:
OpType OP_TYPE_SCALAR = 0
浮点数标量类型。
OpType OP_TYPE_VECTOR_2D = 1
2D 向量类型。
OpType OP_TYPE_VECTOR_2D_SCALAR = 2
x
端口使用 2D 向量类型。前两个端口使用浮点数标量类型。
OpType OP_TYPE_VECTOR_3D = 3
3D向量类型。
OpType OP_TYPE_VECTOR_3D_SCALAR = 4
x
端口使用 3D 向量类型。前两个端口使用浮点数标量类型。
OpType OP_TYPE_VECTOR_4D = 5
4D 向量类型。
OpType OP_TYPE_VECTOR_4D_SCALAR = 6
a
和 b
端口使用 4D 向量类型。weight
端口使用标量类型。
OpType OP_TYPE_MAX = 7
代表 OpType 枚举的大小。
属性说明¶
OpType op_type = 0
操作数和返回值的类型。