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.

VisualShaderNodeSmoothStep

繼承: VisualShaderNode < Resource < RefCounted < Object

在視覺化著色器圖中計算 SmoothStep 函式。

說明

翻譯為著色器語言中的 smoothstep(edge0, edge1, x)

如果 x 小於 edge0 則返回 0.0;如果 x 大於 edge1 則返回 1.0。否則,返回值使用 Hermite 多項式在 0.01.0 之間進行插值。

屬性

OpType

op_type

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

ab 埠使用 4D 向量型別。weight 端口使用標量型別。

OpType OP_TYPE_MAX = 7

代表 OpType 列舉的大小。


屬性說明

OpType op_type = 0 🔗

運算元和返回值的型別。