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.

Enumerations

enum ComparisonType:

  • CTYPE_SCALAR = 0 — A floating-point scalar.
  • CTYPE_VECTOR = 1 — A 3D vector type.
  • CTYPE_BOOLEAN = 2 — A boolean type.
  • CTYPE_TRANSFORM = 3 — A transform (mat4) type.

enum Function:


enum Condition:

  • COND_ALL = 0 — The result will be true if all of component in vector satisfy the comparison condition.
  • COND_ANY = 1 — The result will be true if any of component in vector satisfy the comparison condition.

Property Descriptions

Default0
Setterset_condition(value)
Getterget_condition()

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


Default0
Setterset_function(value)
Getterget_function()

A comparison function. See Function for options.


Default0
Setterset_comparison_type(value)
Getterget_comparison_type()

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

Doc ID missing

Disclaimer: This page has been automaticaly and directly extracted from the official Godot Docs website, the 1970-01-01 at 00:00:00. It’s the English Stable version because it’s what most Godot users should use. The Copyright owners are Juan Linietsky, Ariel Manzur and the Godot community. CC-BY 3.0. Thanks for your patience and generosity.