class_visualshadernodefloatop.rst 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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 VisualShaderNodeFloatOp.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_VisualShaderNodeFloatOp:
  6. VisualShaderNodeFloatOp
  7. =======================
  8. **Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. A floating-point scalar operator to be used within the visual shader graph.
  10. Description
  11. -----------
  12. Applies :ref:`operator<class_VisualShaderNodeFloatOp_property_operator>` to two floating-point inputs: ``a`` and ``b``.
  13. Properties
  14. ----------
  15. +--------------------------------------------------------+------------------------------------------------------------------+-------+
  16. | :ref:`Operator<enum_VisualShaderNodeFloatOp_Operator>` | :ref:`operator<class_VisualShaderNodeFloatOp_property_operator>` | ``0`` |
  17. +--------------------------------------------------------+------------------------------------------------------------------+-------+
  18. Enumerations
  19. ------------
  20. .. _enum_VisualShaderNodeFloatOp_Operator:
  21. .. _class_VisualShaderNodeFloatOp_constant_OP_ADD:
  22. .. _class_VisualShaderNodeFloatOp_constant_OP_SUB:
  23. .. _class_VisualShaderNodeFloatOp_constant_OP_MUL:
  24. .. _class_VisualShaderNodeFloatOp_constant_OP_DIV:
  25. .. _class_VisualShaderNodeFloatOp_constant_OP_MOD:
  26. .. _class_VisualShaderNodeFloatOp_constant_OP_POW:
  27. .. _class_VisualShaderNodeFloatOp_constant_OP_MAX:
  28. .. _class_VisualShaderNodeFloatOp_constant_OP_MIN:
  29. .. _class_VisualShaderNodeFloatOp_constant_OP_ATAN2:
  30. .. _class_VisualShaderNodeFloatOp_constant_OP_STEP:
  31. enum **Operator**:
  32. - **OP_ADD** = **0** --- Sums two numbers using ``a + b``.
  33. - **OP_SUB** = **1** --- Subtracts two numbers using ``a - b``.
  34. - **OP_MUL** = **2** --- Multiplies two numbers using ``a * b``.
  35. - **OP_DIV** = **3** --- Divides two numbers using ``a / b``.
  36. - **OP_MOD** = **4** --- Calculates the remainder of two numbers. Translates to ``mod(a, b)`` in the Godot Shader Language.
  37. - **OP_POW** = **5** --- Raises the ``a`` to the power of ``b``. Translates to ``pow(a, b)`` in the Godot Shader Language.
  38. - **OP_MAX** = **6** --- Returns the greater of two numbers. Translates to ``max(a, b)`` in the Godot Shader Language.
  39. - **OP_MIN** = **7** --- Returns the lesser of two numbers. Translates to ``min(a, b)`` in the Godot Shader Language.
  40. - **OP_ATAN2** = **8** --- Returns the arc-tangent of the parameters. Translates to ``atan(a, b)`` in the Godot Shader Language.
  41. - **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.
  42. Property Descriptions
  43. ---------------------
  44. .. _class_VisualShaderNodeFloatOp_property_operator:
  45. - :ref:`Operator<enum_VisualShaderNodeFloatOp_Operator>` **operator**
  46. +-----------+---------------------+
  47. | *Default* | ``0`` |
  48. +-----------+---------------------+
  49. | *Setter* | set_operator(value) |
  50. +-----------+---------------------+
  51. | *Getter* | get_operator() |
  52. +-----------+---------------------+
  53. An operator to be applied to the inputs. See :ref:`Operator<enum_VisualShaderNodeFloatOp_Operator>` for options.