231 lines
8.5 KiB
Text
231 lines
8.5 KiB
Text
|
:github_url: hide
|
||
|
|
||
|
.. DO NOT EDIT THIS FILE!!!
|
||
|
.. Generated automatically from Godot engine sources.
|
||
|
.. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
|
||
|
.. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/VisualShaderNodeCompare.xml.
|
||
|
|
||
|
.. _class_VisualShaderNodeCompare:
|
||
|
|
||
|
VisualShaderNodeCompare
|
||
|
=======================
|
||
|
|
||
|
**Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
||
|
|
||
|
A comparison function for common types within the visual shader graph.
|
||
|
|
||
|
.. rst-class:: classref-introduction-group
|
||
|
|
||
|
Description
|
||
|
-----------
|
||
|
|
||
|
Compares ``a`` and ``b`` of :ref:`type<class_VisualShaderNodeCompare_property_type>` by :ref:`function<class_VisualShaderNodeCompare_property_function>`. Returns a boolean scalar. Translates to ``if`` instruction in shader code.
|
||
|
|
||
|
.. rst-class:: classref-reftable-group
|
||
|
|
||
|
Properties
|
||
|
----------
|
||
|
|
||
|
.. table::
|
||
|
:widths: auto
|
||
|
|
||
|
+--------------------------------------------------------------------+--------------------------------------------------------------------+-------+
|
||
|
| :ref:`Condition<enum_VisualShaderNodeCompare_Condition>` | :ref:`condition<class_VisualShaderNodeCompare_property_condition>` | ``0`` |
|
||
|
+--------------------------------------------------------------------+--------------------------------------------------------------------+-------+
|
||
|
| :ref:`Function<enum_VisualShaderNodeCompare_Function>` | :ref:`function<class_VisualShaderNodeCompare_property_function>` | ``0`` |
|
||
|
+--------------------------------------------------------------------+--------------------------------------------------------------------+-------+
|
||
|
| :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` | :ref:`type<class_VisualShaderNodeCompare_property_type>` | ``0`` |
|
||
|
+--------------------------------------------------------------------+--------------------------------------------------------------------+-------+
|
||
|
|
||
|
.. rst-class:: classref-section-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. rst-class:: classref-descriptions-group
|
||
|
|
||
|
Enumerations
|
||
|
------------
|
||
|
|
||
|
.. _enum_VisualShaderNodeCompare_ComparisonType:
|
||
|
|
||
|
.. rst-class:: classref-enumeration
|
||
|
|
||
|
enum **ComparisonType**:
|
||
|
|
||
|
.. _class_VisualShaderNodeCompare_constant_CTYPE_SCALAR:
|
||
|
|
||
|
.. rst-class:: classref-enumeration-constant
|
||
|
|
||
|
:ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` **CTYPE_SCALAR** = ``0``
|
||
|
|
||
|
A floating-point scalar.
|
||
|
|
||
|
.. _class_VisualShaderNodeCompare_constant_CTYPE_VECTOR:
|
||
|
|
||
|
.. rst-class:: classref-enumeration-constant
|
||
|
|
||
|
:ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` **CTYPE_VECTOR** = ``1``
|
||
|
|
||
|
A 3D vector type.
|
||
|
|
||
|
.. _class_VisualShaderNodeCompare_constant_CTYPE_BOOLEAN:
|
||
|
|
||
|
.. rst-class:: classref-enumeration-constant
|
||
|
|
||
|
:ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` **CTYPE_BOOLEAN** = ``2``
|
||
|
|
||
|
A boolean type.
|
||
|
|
||
|
.. _class_VisualShaderNodeCompare_constant_CTYPE_TRANSFORM:
|
||
|
|
||
|
.. rst-class:: classref-enumeration-constant
|
||
|
|
||
|
:ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` **CTYPE_TRANSFORM** = ``3``
|
||
|
|
||
|
A transform (``mat4``) type.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _enum_VisualShaderNodeCompare_Function:
|
||
|
|
||
|
.. rst-class:: classref-enumeration
|
||
|
|
||
|
enum **Function**:
|
||
|
|
||
|
.. _class_VisualShaderNodeCompare_constant_FUNC_EQUAL:
|
||
|
|
||
|
.. rst-class:: classref-enumeration-constant
|
||
|
|
||
|
:ref:`Function<enum_VisualShaderNodeCompare_Function>` **FUNC_EQUAL** = ``0``
|
||
|
|
||
|
Comparison for equality (``a == b``).
|
||
|
|
||
|
.. _class_VisualShaderNodeCompare_constant_FUNC_NOT_EQUAL:
|
||
|
|
||
|
.. rst-class:: classref-enumeration-constant
|
||
|
|
||
|
:ref:`Function<enum_VisualShaderNodeCompare_Function>` **FUNC_NOT_EQUAL** = ``1``
|
||
|
|
||
|
Comparison for inequality (``a != b``).
|
||
|
|
||
|
.. _class_VisualShaderNodeCompare_constant_FUNC_GREATER_THAN:
|
||
|
|
||
|
.. rst-class:: classref-enumeration-constant
|
||
|
|
||
|
:ref:`Function<enum_VisualShaderNodeCompare_Function>` **FUNC_GREATER_THAN** = ``2``
|
||
|
|
||
|
Comparison for greater than (``a > b``). Cannot be used if :ref:`type<class_VisualShaderNodeCompare_property_type>` set to :ref:`CTYPE_BOOLEAN<class_VisualShaderNodeCompare_constant_CTYPE_BOOLEAN>` or :ref:`CTYPE_TRANSFORM<class_VisualShaderNodeCompare_constant_CTYPE_TRANSFORM>`.
|
||
|
|
||
|
.. _class_VisualShaderNodeCompare_constant_FUNC_GREATER_THAN_EQUAL:
|
||
|
|
||
|
.. rst-class:: classref-enumeration-constant
|
||
|
|
||
|
:ref:`Function<enum_VisualShaderNodeCompare_Function>` **FUNC_GREATER_THAN_EQUAL** = ``3``
|
||
|
|
||
|
Comparison for greater than or equal (``a >= b``). Cannot be used if :ref:`type<class_VisualShaderNodeCompare_property_type>` set to :ref:`CTYPE_BOOLEAN<class_VisualShaderNodeCompare_constant_CTYPE_BOOLEAN>` or :ref:`CTYPE_TRANSFORM<class_VisualShaderNodeCompare_constant_CTYPE_TRANSFORM>`.
|
||
|
|
||
|
.. _class_VisualShaderNodeCompare_constant_FUNC_LESS_THAN:
|
||
|
|
||
|
.. rst-class:: classref-enumeration-constant
|
||
|
|
||
|
:ref:`Function<enum_VisualShaderNodeCompare_Function>` **FUNC_LESS_THAN** = ``4``
|
||
|
|
||
|
Comparison for less than (``a < b``). Cannot be used if :ref:`type<class_VisualShaderNodeCompare_property_type>` set to :ref:`CTYPE_BOOLEAN<class_VisualShaderNodeCompare_constant_CTYPE_BOOLEAN>` or :ref:`CTYPE_TRANSFORM<class_VisualShaderNodeCompare_constant_CTYPE_TRANSFORM>`.
|
||
|
|
||
|
.. _class_VisualShaderNodeCompare_constant_FUNC_LESS_THAN_EQUAL:
|
||
|
|
||
|
.. rst-class:: classref-enumeration-constant
|
||
|
|
||
|
:ref:`Function<enum_VisualShaderNodeCompare_Function>` **FUNC_LESS_THAN_EQUAL** = ``5``
|
||
|
|
||
|
Comparison for less than or equal (``a < b``). Cannot be used if :ref:`type<class_VisualShaderNodeCompare_property_type>` set to :ref:`CTYPE_BOOLEAN<class_VisualShaderNodeCompare_constant_CTYPE_BOOLEAN>` or :ref:`CTYPE_TRANSFORM<class_VisualShaderNodeCompare_constant_CTYPE_TRANSFORM>`.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _enum_VisualShaderNodeCompare_Condition:
|
||
|
|
||
|
.. rst-class:: classref-enumeration
|
||
|
|
||
|
enum **Condition**:
|
||
|
|
||
|
.. _class_VisualShaderNodeCompare_constant_COND_ALL:
|
||
|
|
||
|
.. rst-class:: classref-enumeration-constant
|
||
|
|
||
|
:ref:`Condition<enum_VisualShaderNodeCompare_Condition>` **COND_ALL** = ``0``
|
||
|
|
||
|
The result will be true if all of component in vector satisfy the comparison condition.
|
||
|
|
||
|
.. _class_VisualShaderNodeCompare_constant_COND_ANY:
|
||
|
|
||
|
.. rst-class:: classref-enumeration-constant
|
||
|
|
||
|
:ref:`Condition<enum_VisualShaderNodeCompare_Condition>` **COND_ANY** = ``1``
|
||
|
|
||
|
The result will be true if any of component in vector satisfy the comparison condition.
|
||
|
|
||
|
.. rst-class:: classref-section-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. rst-class:: classref-descriptions-group
|
||
|
|
||
|
Property Descriptions
|
||
|
---------------------
|
||
|
|
||
|
.. _class_VisualShaderNodeCompare_property_condition:
|
||
|
|
||
|
.. rst-class:: classref-property
|
||
|
|
||
|
:ref:`Condition<enum_VisualShaderNodeCompare_Condition>` **condition** = ``0``
|
||
|
|
||
|
.. rst-class:: classref-property-setget
|
||
|
|
||
|
- void **set_condition** **(** :ref:`Condition<enum_VisualShaderNodeCompare_Condition>` value **)**
|
||
|
- :ref:`Condition<enum_VisualShaderNodeCompare_Condition>` **get_condition** **(** **)**
|
||
|
|
||
|
Extra condition which is applied if :ref:`type<class_VisualShaderNodeCompare_property_type>` is set to :ref:`CTYPE_VECTOR<class_VisualShaderNodeCompare_constant_CTYPE_VECTOR>`.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_VisualShaderNodeCompare_property_function:
|
||
|
|
||
|
.. rst-class:: classref-property
|
||
|
|
||
|
:ref:`Function<enum_VisualShaderNodeCompare_Function>` **function** = ``0``
|
||
|
|
||
|
.. rst-class:: classref-property-setget
|
||
|
|
||
|
- void **set_function** **(** :ref:`Function<enum_VisualShaderNodeCompare_Function>` value **)**
|
||
|
- :ref:`Function<enum_VisualShaderNodeCompare_Function>` **get_function** **(** **)**
|
||
|
|
||
|
A comparison function. See :ref:`Function<enum_VisualShaderNodeCompare_Function>` for options.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_VisualShaderNodeCompare_property_type:
|
||
|
|
||
|
.. rst-class:: classref-property
|
||
|
|
||
|
:ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` **type** = ``0``
|
||
|
|
||
|
.. rst-class:: classref-property-setget
|
||
|
|
||
|
- void **set_comparison_type** **(** :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` value **)**
|
||
|
- :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` **get_comparison_type** **(** **)**
|
||
|
|
||
|
The type to be used in the comparison. See :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` for options.
|
||
|
|
||
|
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||
|
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||
|
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||
|
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|