VisualShaderNodeCompare

Inherits: VisualShaderNode < Resource < Reference < Object

A comparison function for common types within the visual shader graph.

Description

Compares a and b of type by function. Returns a boolean scalar. Translates to if instruction in shader code.

Properties

Condition

condition

0

Function

function

0

ComparisonType

type

0


Enumerations

enum ComparisonType:

ComparisonType CTYPE_SCALAR = 0

A floating-point scalar.

ComparisonType CTYPE_VECTOR = 1

A 3D vector type.

ComparisonType CTYPE_BOOLEAN = 2

A boolean type.

ComparisonType CTYPE_TRANSFORM = 3

A transform (mat4) type.


enum Function:

Function FUNC_EQUAL = 0

Comparison for equality (a == b).

Function FUNC_NOT_EQUAL = 1

Comparison for inequality (a != b).

Function FUNC_GREATER_THAN = 2

Comparison for greater than (a > b). Cannot be used if type set to CTYPE_BOOLEAN or CTYPE_TRANSFORM.

Function FUNC_GREATER_THAN_EQUAL = 3

Comparison for greater than or equal (a >= b). Cannot be used if type set to CTYPE_BOOLEAN or CTYPE_TRANSFORM.

Function FUNC_LESS_THAN = 4

Comparison for less than (a < b). Cannot be used if type set to CTYPE_BOOLEAN or CTYPE_TRANSFORM.

Function FUNC_LESS_THAN_EQUAL = 5

Comparison for less than or equal (a < b). Cannot be used if type set to CTYPE_BOOLEAN or CTYPE_TRANSFORM.


enum Condition:

Condition COND_ALL = 0

The result will be true if all of component in vector satisfy the comparison condition.

Condition COND_ANY = 1

The result will be true if any of component in vector satisfy the comparison condition.


Property Descriptions

Condition condition = 0

Extra condition which is applied if type is set to CTYPE_VECTOR.


Function function = 0

A comparison function. See Function for options.


ComparisonType type = 0

The type to be used in the comparison. See ComparisonType for options.