class_visualshadernodefloatfunc.rst 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  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/4.0/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.0/doc/classes/VisualShaderNodeFloatFunc.xml.
  6. .. _class_VisualShaderNodeFloatFunc:
  7. VisualShaderNodeFloatFunc
  8. =========================
  9. **Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A scalar floating-point function to be used within the visual shader graph.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Accept a floating-point scalar (``x``) to the input port and transform it according to :ref:`function<class_VisualShaderNodeFloatFunc_property_function>`.
  15. .. rst-class:: classref-reftable-group
  16. Properties
  17. ----------
  18. .. table::
  19. :widths: auto
  20. +----------------------------------------------------------+--------------------------------------------------------------------+--------+
  21. | :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` | :ref:`function<class_VisualShaderNodeFloatFunc_property_function>` | ``13`` |
  22. +----------------------------------------------------------+--------------------------------------------------------------------+--------+
  23. .. rst-class:: classref-section-separator
  24. ----
  25. .. rst-class:: classref-descriptions-group
  26. Enumerations
  27. ------------
  28. .. _enum_VisualShaderNodeFloatFunc_Function:
  29. .. rst-class:: classref-enumeration
  30. enum **Function**:
  31. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_SIN:
  32. .. rst-class:: classref-enumeration-constant
  33. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_SIN** = ``0``
  34. Returns the sine of the parameter. Translates to ``sin(x)`` in the Godot Shader Language.
  35. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_COS:
  36. .. rst-class:: classref-enumeration-constant
  37. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_COS** = ``1``
  38. Returns the cosine of the parameter. Translates to ``cos(x)`` in the Godot Shader Language.
  39. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_TAN:
  40. .. rst-class:: classref-enumeration-constant
  41. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_TAN** = ``2``
  42. Returns the tangent of the parameter. Translates to ``tan(x)`` in the Godot Shader Language.
  43. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_ASIN:
  44. .. rst-class:: classref-enumeration-constant
  45. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_ASIN** = ``3``
  46. Returns the arc-sine of the parameter. Translates to ``asin(x)`` in the Godot Shader Language.
  47. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_ACOS:
  48. .. rst-class:: classref-enumeration-constant
  49. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_ACOS** = ``4``
  50. Returns the arc-cosine of the parameter. Translates to ``acos(x)`` in the Godot Shader Language.
  51. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_ATAN:
  52. .. rst-class:: classref-enumeration-constant
  53. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_ATAN** = ``5``
  54. Returns the arc-tangent of the parameter. Translates to ``atan(x)`` in the Godot Shader Language.
  55. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_SINH:
  56. .. rst-class:: classref-enumeration-constant
  57. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_SINH** = ``6``
  58. Returns the hyperbolic sine of the parameter. Translates to ``sinh(x)`` in the Godot Shader Language.
  59. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_COSH:
  60. .. rst-class:: classref-enumeration-constant
  61. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_COSH** = ``7``
  62. Returns the hyperbolic cosine of the parameter. Translates to ``cosh(x)`` in the Godot Shader Language.
  63. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_TANH:
  64. .. rst-class:: classref-enumeration-constant
  65. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_TANH** = ``8``
  66. Returns the hyperbolic tangent of the parameter. Translates to ``tanh(x)`` in the Godot Shader Language.
  67. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_LOG:
  68. .. rst-class:: classref-enumeration-constant
  69. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_LOG** = ``9``
  70. Returns the natural logarithm of the parameter. Translates to ``log(x)`` in the Godot Shader Language.
  71. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_EXP:
  72. .. rst-class:: classref-enumeration-constant
  73. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_EXP** = ``10``
  74. Returns the natural exponentiation of the parameter. Translates to ``exp(x)`` in the Godot Shader Language.
  75. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_SQRT:
  76. .. rst-class:: classref-enumeration-constant
  77. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_SQRT** = ``11``
  78. Returns the square root of the parameter. Translates to ``sqrt(x)`` in the Godot Shader Language.
  79. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_ABS:
  80. .. rst-class:: classref-enumeration-constant
  81. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_ABS** = ``12``
  82. Returns the absolute value of the parameter. Translates to ``abs(x)`` in the Godot Shader Language.
  83. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_SIGN:
  84. .. rst-class:: classref-enumeration-constant
  85. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_SIGN** = ``13``
  86. Extracts the sign of the parameter. Translates to ``sign(x)`` in the Godot Shader Language.
  87. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_FLOOR:
  88. .. rst-class:: classref-enumeration-constant
  89. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_FLOOR** = ``14``
  90. Finds the nearest integer less than or equal to the parameter. Translates to ``floor(x)`` in the Godot Shader Language.
  91. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_ROUND:
  92. .. rst-class:: classref-enumeration-constant
  93. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_ROUND** = ``15``
  94. Finds the nearest integer to the parameter. Translates to ``round(x)`` in the Godot Shader Language.
  95. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_CEIL:
  96. .. rst-class:: classref-enumeration-constant
  97. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_CEIL** = ``16``
  98. Finds the nearest integer that is greater than or equal to the parameter. Translates to ``ceil(x)`` in the Godot Shader Language.
  99. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_FRACT:
  100. .. rst-class:: classref-enumeration-constant
  101. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_FRACT** = ``17``
  102. Computes the fractional part of the argument. Translates to ``fract(x)`` in the Godot Shader Language.
  103. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_SATURATE:
  104. .. rst-class:: classref-enumeration-constant
  105. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_SATURATE** = ``18``
  106. Clamps the value between ``0.0`` and ``1.0`` using ``min(max(x, 0.0), 1.0)``.
  107. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_NEGATE:
  108. .. rst-class:: classref-enumeration-constant
  109. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_NEGATE** = ``19``
  110. Negates the ``x`` using ``-(x)``.
  111. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_ACOSH:
  112. .. rst-class:: classref-enumeration-constant
  113. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_ACOSH** = ``20``
  114. Returns the arc-hyperbolic-cosine of the parameter. Translates to ``acosh(x)`` in the Godot Shader Language.
  115. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_ASINH:
  116. .. rst-class:: classref-enumeration-constant
  117. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_ASINH** = ``21``
  118. Returns the arc-hyperbolic-sine of the parameter. Translates to ``asinh(x)`` in the Godot Shader Language.
  119. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_ATANH:
  120. .. rst-class:: classref-enumeration-constant
  121. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_ATANH** = ``22``
  122. Returns the arc-hyperbolic-tangent of the parameter. Translates to ``atanh(x)`` in the Godot Shader Language.
  123. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_DEGREES:
  124. .. rst-class:: classref-enumeration-constant
  125. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_DEGREES** = ``23``
  126. Convert a quantity in radians to degrees. Translates to ``degrees(x)`` in the Godot Shader Language.
  127. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_EXP2:
  128. .. rst-class:: classref-enumeration-constant
  129. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_EXP2** = ``24``
  130. Returns 2 raised by the power of the parameter. Translates to ``exp2(x)`` in the Godot Shader Language.
  131. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_INVERSE_SQRT:
  132. .. rst-class:: classref-enumeration-constant
  133. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_INVERSE_SQRT** = ``25``
  134. Returns the inverse of the square root of the parameter. Translates to ``inversesqrt(x)`` in the Godot Shader Language.
  135. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_LOG2:
  136. .. rst-class:: classref-enumeration-constant
  137. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_LOG2** = ``26``
  138. Returns the base 2 logarithm of the parameter. Translates to ``log2(x)`` in the Godot Shader Language.
  139. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_RADIANS:
  140. .. rst-class:: classref-enumeration-constant
  141. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_RADIANS** = ``27``
  142. Convert a quantity in degrees to radians. Translates to ``radians(x)`` in the Godot Shader Language.
  143. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_RECIPROCAL:
  144. .. rst-class:: classref-enumeration-constant
  145. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_RECIPROCAL** = ``28``
  146. Finds reciprocal value of dividing 1 by ``x`` (i.e. ``1 / x``).
  147. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_ROUNDEVEN:
  148. .. rst-class:: classref-enumeration-constant
  149. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_ROUNDEVEN** = ``29``
  150. Finds the nearest even integer to the parameter. Translates to ``roundEven(x)`` in the Godot Shader Language.
  151. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_TRUNC:
  152. .. rst-class:: classref-enumeration-constant
  153. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_TRUNC** = ``30``
  154. Returns a value equal to the nearest integer to ``x`` whose absolute value is not larger than the absolute value of ``x``. Translates to ``trunc(x)`` in the Godot Shader Language.
  155. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_ONEMINUS:
  156. .. rst-class:: classref-enumeration-constant
  157. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_ONEMINUS** = ``31``
  158. Subtracts scalar ``x`` from 1 (i.e. ``1 - x``).
  159. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_MAX:
  160. .. rst-class:: classref-enumeration-constant
  161. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **FUNC_MAX** = ``32``
  162. Represents the size of the :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` enum.
  163. .. rst-class:: classref-section-separator
  164. ----
  165. .. rst-class:: classref-descriptions-group
  166. Property Descriptions
  167. ---------------------
  168. .. _class_VisualShaderNodeFloatFunc_property_function:
  169. .. rst-class:: classref-property
  170. :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **function** = ``13``
  171. .. rst-class:: classref-property-setget
  172. - void **set_function** **(** :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` value **)**
  173. - :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **get_function** **(** **)**
  174. A function to be applied to the scalar. See :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` for options.
  175. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  176. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  177. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  178. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  179. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  180. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`