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...
VisualShaderNodeCompare
繼承: VisualShaderNode < Resource < RefCounted < Object
視覺化著色器圖內常見型別的比較函式。
說明
屬性
|
||
|
||
|
列舉
enum ComparisonType: 🔗
ComparisonType CTYPE_SCALAR = 0
浮點標量。
ComparisonType CTYPE_SCALAR_INT = 1
整數標量。
ComparisonType CTYPE_SCALAR_UINT = 2
不帶正負號的整數標量。
ComparisonType CTYPE_VECTOR_2D = 3
2D 向量型別。
ComparisonType CTYPE_VECTOR_3D = 4
3D向量型別。
ComparisonType CTYPE_VECTOR_4D = 5
4D 向量型別。
ComparisonType CTYPE_BOOLEAN = 6
布林型別。
ComparisonType CTYPE_TRANSFORM = 7
變換型別,即 mat4。
ComparisonType CTYPE_MAX = 8
代表 ComparisonType 列舉的大小。
enum Function: 🔗
Function FUNC_EQUAL = 0
相等比較(a == b)。
Function FUNC_NOT_EQUAL = 1
不等比較(a != b)。
Function FUNC_GREATER_THAN = 2
大於比較(a > b)。如果 type 設定為 CTYPE_BOOLEAN 或 CTYPE_TRANSFORM,則無法使用。
Function FUNC_GREATER_THAN_EQUAL = 3
大於或等於的比較(a >= b)。如果 type 設定為 CTYPE_BOOLEAN 或 CTYPE_TRANSFORM,則無法使用。
Function FUNC_LESS_THAN = 4
小於比較(a < b)。如果 type 設定為 CTYPE_BOOLEAN 或 CTYPE_TRANSFORM,則無法使用。
Function FUNC_LESS_THAN_EQUAL = 5
小於或等於的比較(a <= b)。如果 type 設定為 CTYPE_BOOLEAN 或 CTYPE_TRANSFORM,則無法使用。
Function FUNC_MAX = 6
代表 Function 列舉的大小。
enum Condition: 🔗
Condition COND_ALL = 0
The result will be true if all components in the vector satisfy the comparison condition.
Condition COND_ANY = 1
The result will be true if any component in the vector satisfies the comparison condition.
Condition COND_MAX = 2
代表 Condition 列舉的大小。
屬性說明
type 被設定為 CTYPE_VECTOR_3D 時套用的額外條件。
A comparison function.
ComparisonType type = 0 🔗
void set_comparison_type(value: ComparisonType)
ComparisonType get_comparison_type()
The type to be used in the comparison.