class_visualshadernodefloatop.rst 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/VisualShaderNodeFloatOp.xml.
  6. .. _class_VisualShaderNodeFloatOp:
  7. VisualShaderNodeFloatOp
  8. =======================
  9. **Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A floating-point scalar operator to be used within the visual shader graph.
  11. Description
  12. -----------
  13. Applies :ref:`operator<class_VisualShaderNodeFloatOp_property_operator>` to two floating-point inputs: ``a`` and ``b``.
  14. Properties
  15. ----------
  16. +--------------------------------------------------------+------------------------------------------------------------------+-------+
  17. | :ref:`Operator<enum_VisualShaderNodeFloatOp_Operator>` | :ref:`operator<class_VisualShaderNodeFloatOp_property_operator>` | ``0`` |
  18. +--------------------------------------------------------+------------------------------------------------------------------+-------+
  19. Enumerations
  20. ------------
  21. .. _enum_VisualShaderNodeFloatOp_Operator:
  22. .. _class_VisualShaderNodeFloatOp_constant_OP_ADD:
  23. .. _class_VisualShaderNodeFloatOp_constant_OP_SUB:
  24. .. _class_VisualShaderNodeFloatOp_constant_OP_MUL:
  25. .. _class_VisualShaderNodeFloatOp_constant_OP_DIV:
  26. .. _class_VisualShaderNodeFloatOp_constant_OP_MOD:
  27. .. _class_VisualShaderNodeFloatOp_constant_OP_POW:
  28. .. _class_VisualShaderNodeFloatOp_constant_OP_MAX:
  29. .. _class_VisualShaderNodeFloatOp_constant_OP_MIN:
  30. .. _class_VisualShaderNodeFloatOp_constant_OP_ATAN2:
  31. .. _class_VisualShaderNodeFloatOp_constant_OP_STEP:
  32. .. _class_VisualShaderNodeFloatOp_constant_OP_ENUM_SIZE:
  33. enum **Operator**:
  34. - **OP_ADD** = **0** --- Sums two numbers using ``a + b``.
  35. - **OP_SUB** = **1** --- Subtracts two numbers using ``a - b``.
  36. - **OP_MUL** = **2** --- Multiplies two numbers using ``a * b``.
  37. - **OP_DIV** = **3** --- Divides two numbers using ``a / b``.
  38. - **OP_MOD** = **4** --- Calculates the remainder of two numbers. Translates to ``mod(a, b)`` in the Godot Shader Language.
  39. - **OP_POW** = **5** --- Raises the ``a`` to the power of ``b``. Translates to ``pow(a, b)`` in the Godot Shader Language.
  40. - **OP_MAX** = **6** --- Returns the greater of two numbers. Translates to ``max(a, b)`` in the Godot Shader Language.
  41. - **OP_MIN** = **7** --- Returns the lesser of two numbers. Translates to ``min(a, b)`` in the Godot Shader Language.
  42. - **OP_ATAN2** = **8** --- Returns the arc-tangent of the parameters. Translates to ``atan(a, b)`` in the Godot Shader Language.
  43. - **OP_STEP** = **9** --- Generates a step function by comparing ``b``\ (x) to ``a``\ (edge). Returns 0.0 if ``x`` is smaller than ``edge`` and otherwise 1.0. Translates to ``step(a, b)`` in the Godot Shader Language.
  44. - **OP_ENUM_SIZE** = **10** --- Represents the size of the :ref:`Operator<enum_VisualShaderNodeFloatOp_Operator>` enum.
  45. Property Descriptions
  46. ---------------------
  47. .. _class_VisualShaderNodeFloatOp_property_operator:
  48. - :ref:`Operator<enum_VisualShaderNodeFloatOp_Operator>` **operator**
  49. +-----------+---------------------+
  50. | *Default* | ``0`` |
  51. +-----------+---------------------+
  52. | *Setter* | set_operator(value) |
  53. +-----------+---------------------+
  54. | *Getter* | get_operator() |
  55. +-----------+---------------------+
  56. An operator to be applied to the inputs. See :ref:`Operator<enum_VisualShaderNodeFloatOp_Operator>` for options.
  57. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  58. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  59. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  60. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  61. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  62. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`