Class reference

VisualShaderNodeDerivativeFunc

Inherits VisualShaderNode

Calculates a derivative within the visual shader graph.

Description

This node is only available in Fragment and Light visual shaders.

Properties

int function = 0

A derivative function type.

int op_type = 0

A type of operands and returned value.

int precision = 0

Sets the level of precision to use for the derivative function. When using the Compatibility renderer, this setting has no effect.

Constants

OP_TYPE_SCALAR = 0

Enum: OpType

A floating-point scalar.

OP_TYPE_VECTOR_2D = 1

Enum: OpType

A 2D vector type.

OP_TYPE_VECTOR_3D = 2

Enum: OpType

A 3D vector type.

OP_TYPE_VECTOR_4D = 3

Enum: OpType

A 4D vector type.

OP_TYPE_MAX = 4

Enum: OpType

Represents the size of the OpType enum.

FUNC_SUM = 0

Enum: Function

Sum of absolute derivative in x and y.

FUNC_X = 1

Enum: Function

Derivative in x using local differencing.

FUNC_Y = 2

Enum: Function

Derivative in y using local differencing.

FUNC_MAX = 3

Enum: Function

Represents the size of the Function enum.

PRECISION_NONE = 0

Enum: Precision

No precision is specified, the GPU driver is allowed to use whatever level of precision it chooses. This is the default option and is equivalent to using dFdx() or dFdy() in text shaders.

PRECISION_COARSE = 1

Enum: Precision

The derivative will be calculated using the current fragment's neighbors (which may not include the current fragment). This tends to be faster than using PRECISION_FINE, but may not be suitable when more precision is needed. This is equivalent to using dFdxCoarse() or dFdyCoarse() in text shaders.

PRECISION_FINE = 2

Enum: Precision

The derivative will be calculated using the current fragment and its immediate neighbors. This tends to be slower than using PRECISION_COARSE, but may be necessary when more precision is needed. This is equivalent to using dFdxFine() or dFdyFine() in text shaders.

PRECISION_MAX = 3

Enum: Precision

Represents the size of the Precision enum.

Source revision 4f5b14abade2
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.