class_visualshadernodeintop.rst 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the VisualShaderNodeIntOp.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_VisualShaderNodeIntOp:
  6. VisualShaderNodeIntOp
  7. =====================
  8. **Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. An integer scalar operator to be used within the visual shader graph.
  10. Description
  11. -----------
  12. Applies :ref:`operator<class_VisualShaderNodeIntOp_property_operator>` to two integer inputs: ``a`` and ``b``.
  13. Properties
  14. ----------
  15. +------------------------------------------------------+----------------------------------------------------------------+-------+
  16. | :ref:`Operator<enum_VisualShaderNodeIntOp_Operator>` | :ref:`operator<class_VisualShaderNodeIntOp_property_operator>` | ``0`` |
  17. +------------------------------------------------------+----------------------------------------------------------------+-------+
  18. Enumerations
  19. ------------
  20. .. _enum_VisualShaderNodeIntOp_Operator:
  21. .. _class_VisualShaderNodeIntOp_constant_OP_ADD:
  22. .. _class_VisualShaderNodeIntOp_constant_OP_SUB:
  23. .. _class_VisualShaderNodeIntOp_constant_OP_MUL:
  24. .. _class_VisualShaderNodeIntOp_constant_OP_DIV:
  25. .. _class_VisualShaderNodeIntOp_constant_OP_MOD:
  26. .. _class_VisualShaderNodeIntOp_constant_OP_MAX:
  27. .. _class_VisualShaderNodeIntOp_constant_OP_MIN:
  28. enum **Operator**:
  29. - **OP_ADD** = **0** --- Sums two numbers using ``a + b``.
  30. - **OP_SUB** = **1** --- Subtracts two numbers using ``a - b``.
  31. - **OP_MUL** = **2** --- Multiplies two numbers using ``a * b``.
  32. - **OP_DIV** = **3** --- Divides two numbers using ``a / b``.
  33. - **OP_MOD** = **4** --- Calculates the remainder of two numbers using ``a % b``.
  34. - **OP_MAX** = **5** --- Returns the greater of two numbers. Translates to ``max(a, b)`` in the Godot Shader Language.
  35. - **OP_MIN** = **6** --- Returns the lesser of two numbers. Translates to ``max(a, b)`` in the Godot Shader Language.
  36. Property Descriptions
  37. ---------------------
  38. .. _class_VisualShaderNodeIntOp_property_operator:
  39. - :ref:`Operator<enum_VisualShaderNodeIntOp_Operator>` **operator**
  40. +-----------+---------------------+
  41. | *Default* | ``0`` |
  42. +-----------+---------------------+
  43. | *Setter* | set_operator(value) |
  44. +-----------+---------------------+
  45. | *Getter* | get_operator() |
  46. +-----------+---------------------+
  47. An operator to be applied to the inputs. See :ref:`Operator<enum_VisualShaderNodeIntOp_Operator>` for options.