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.

VisualShaderNodeCompare

Inherits: VisualShaderNode < Resource < RefCounted < 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_SCALAR_INT = 1

An integer scalar.

ComparisonType CTYPE_SCALAR_UINT = 2

An unsigned integer scalar.

ComparisonType CTYPE_VECTOR_2D = 3

A 2D vector type.

ComparisonType CTYPE_VECTOR_3D = 4

A 3D vector type.

ComparisonType CTYPE_VECTOR_4D = 5

A 4D vector type.

ComparisonType CTYPE_BOOLEAN = 6

A boolean type.

ComparisonType CTYPE_TRANSFORM = 7

A transform (mat4) type.

ComparisonType CTYPE_MAX = 8

Represents the size of the ComparisonType enum.


enum Function:

Function FUNC_EQUAL = 0

Comparison for equality (a == b).

Function FUNC_NOT_EQUAL = 1

Comparison for inequality (a != b).