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...
VisualShaderNodeDerivativeFunc
繼承: VisualShaderNode < Resource < RefCounted < Object
在視覺化著色器圖中,計算導數。
說明
此節點僅在Fragment和Light視覺化著色器中可用。
屬性
|
||
|
||
|
列舉
enum OpType: 🔗
OpType OP_TYPE_SCALAR = 0
浮點標量。
OpType OP_TYPE_VECTOR_2D = 1
2D 向量型別。
OpType OP_TYPE_VECTOR_3D = 2
3D向量型別。
OpType OP_TYPE_VECTOR_4D = 3
4D 向量型別。
OpType OP_TYPE_MAX = 4
代表 OpType 列舉的大小。
enum Function: 🔗
Function FUNC_SUM = 0
x 和 y 的絕對導數之和。
Function FUNC_X = 1
在 x 中使用局部差分的導數。
Function FUNC_Y = 2
在 y 中使用局部差分的導數。
Function FUNC_MAX = 3
代表 Function 列舉的大小。
enum Precision: 🔗
Precision PRECISION_NONE = 0
未指定精度,GPU 驅動可以自行選用精度等級。這是預設選項,等價於在文字著色器中使用 dFdx() 或 dFdy()。
Precision PRECISION_COARSE = 1
將使用目前片段的鄰居(可能不包括目前片段)計算導數。這往往比使用 PRECISION_FINE 更快,但在需要更高精度時可能不適合。這相當於在文字著色器中使用 dFdxCoarse() 或 dFdyCoarse()。
Precision PRECISION_FINE = 2
將使用目前片段及其直接鄰居計算導數。這往往比使用 PRECISION_COARSE 慢,但當需要更高的精度時可能是必需的。這相當於在文字著色器中使用 dFdxFine() 或 dFdyFine()。
Precision PRECISION_MAX = 3
代表 Precision 列舉的大小。
屬性說明
A derivative function type.
運算元和返回值的型別。
Sets the level of precision to use for the derivative function. When using the Compatibility renderer, this setting has no effect.