Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

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