class_visualshadernodefloatfunc.rst 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the VisualShaderNodeFloatFunc.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_VisualShaderNodeFloatFunc:
  6. VisualShaderNodeFloatFunc
  7. =========================
  8. **Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  9. A scalar floating-point function to be used within the visual shader graph.
  10. Description
  11. -----------
  12. Accept a floating-point scalar (``x``) to the input port and transform it according to :ref:`function<class_VisualShaderNodeFloatFunc_property_function>`.
  13. Properties
  14. ----------
  15. +----------------------------------------------------------+--------------------------------------------------------------------+--------+
  16. | :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` | :ref:`function<class_VisualShaderNodeFloatFunc_property_function>` | ``13`` |
  17. +----------------------------------------------------------+--------------------------------------------------------------------+--------+
  18. Enumerations
  19. ------------
  20. .. _enum_VisualShaderNodeFloatFunc_Function:
  21. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_SIN:
  22. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_COS:
  23. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_TAN:
  24. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_ASIN:
  25. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_ACOS:
  26. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_ATAN:
  27. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_SINH:
  28. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_COSH:
  29. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_TANH:
  30. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_LOG:
  31. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_EXP:
  32. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_SQRT:
  33. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_ABS:
  34. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_SIGN:
  35. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_FLOOR:
  36. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_ROUND:
  37. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_CEIL:
  38. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_FRAC:
  39. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_SATURATE:
  40. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_NEGATE:
  41. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_ACOSH:
  42. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_ASINH:
  43. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_ATANH:
  44. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_DEGREES:
  45. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_EXP2:
  46. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_INVERSE_SQRT:
  47. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_LOG2:
  48. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_RADIANS:
  49. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_RECIPROCAL:
  50. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_ROUNDEVEN:
  51. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_TRUNC:
  52. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_ONEMINUS:
  53. .. _class_VisualShaderNodeFloatFunc_constant_FUNC_MAX:
  54. enum **Function**:
  55. - **FUNC_SIN** = **0** --- Returns the sine of the parameter. Translates to ``sin(x)`` in the Godot Shader Language.
  56. - **FUNC_COS** = **1** --- Returns the cosine of the parameter. Translates to ``cos(x)`` in the Godot Shader Language.
  57. - **FUNC_TAN** = **2** --- Returns the tangent of the parameter. Translates to ``tan(x)`` in the Godot Shader Language.
  58. - **FUNC_ASIN** = **3** --- Returns the arc-sine of the parameter. Translates to ``asin(x)`` in the Godot Shader Language.
  59. - **FUNC_ACOS** = **4** --- Returns the arc-cosine of the parameter. Translates to ``acos(x)`` in the Godot Shader Language.
  60. - **FUNC_ATAN** = **5** --- Returns the arc-tangent of the parameter. Translates to ``atan(x)`` in the Godot Shader Language.
  61. - **FUNC_SINH** = **6** --- Returns the hyperbolic sine of the parameter. Translates to ``sinh(x)`` in the Godot Shader Language.
  62. - **FUNC_COSH** = **7** --- Returns the hyperbolic cosine of the parameter. Translates to ``cosh(x)`` in the Godot Shader Language.
  63. - **FUNC_TANH** = **8** --- Returns the hyperbolic tangent of the parameter. Translates to ``tanh(x)`` in the Godot Shader Language.
  64. - **FUNC_LOG** = **9** --- Returns the natural logarithm of the parameter. Translates to ``log(x)`` in the Godot Shader Language.
  65. - **FUNC_EXP** = **10** --- Returns the natural exponentiation of the parameter. Translates to ``exp(x)`` in the Godot Shader Language.
  66. - **FUNC_SQRT** = **11** --- Returns the square root of the parameter. Translates to ``sqrt(x)`` in the Godot Shader Language.
  67. - **FUNC_ABS** = **12** --- Returns the absolute value of the parameter. Translates to ``abs(x)`` in the Godot Shader Language.
  68. - **FUNC_SIGN** = **13** --- Extracts the sign of the parameter. Translates to ``sign(x)`` in the Godot Shader Language.
  69. - **FUNC_FLOOR** = **14** --- Finds the nearest integer less than or equal to the parameter. Translates to ``floor(x)`` in the Godot Shader Language.
  70. - **FUNC_ROUND** = **15** --- Finds the nearest integer to the parameter. Translates to ``round(x)`` in the Godot Shader Language.
  71. - **FUNC_CEIL** = **16** --- Finds the nearest integer that is greater than or equal to the parameter. Translates to ``ceil(x)`` in the Godot Shader Language.
  72. - **FUNC_FRAC** = **17** --- Computes the fractional part of the argument. Translates to ``fract(x)`` in the Godot Shader Language.
  73. - **FUNC_SATURATE** = **18** --- Clamps the value between ``0.0`` and ``1.0`` using ``min(max(x, 0.0), 1.0)``.
  74. - **FUNC_NEGATE** = **19** --- Negates the ``x`` using ``-(x)``.
  75. - **FUNC_ACOSH** = **20** --- Returns the arc-hyperbolic-cosine of the parameter. Translates to ``acosh(x)`` in the Godot Shader Language.
  76. - **FUNC_ASINH** = **21** --- Returns the arc-hyperbolic-sine of the parameter. Translates to ``asinh(x)`` in the Godot Shader Language.
  77. - **FUNC_ATANH** = **22** --- Returns the arc-hyperbolic-tangent of the parameter. Translates to ``atanh(x)`` in the Godot Shader Language.
  78. - **FUNC_DEGREES** = **23** --- Convert a quantity in radians to degrees. Translates to ``degrees(x)`` in the Godot Shader Language.
  79. - **FUNC_EXP2** = **24** --- Returns 2 raised by the power of the parameter. Translates to ``exp2(x)`` in the Godot Shader Language.
  80. - **FUNC_INVERSE_SQRT** = **25** --- Returns the inverse of the square root of the parameter. Translates to ``inversesqrt(x)`` in the Godot Shader Language.
  81. - **FUNC_LOG2** = **26** --- Returns the base 2 logarithm of the parameter. Translates to ``log2(x)`` in the Godot Shader Language.
  82. - **FUNC_RADIANS** = **27** --- Convert a quantity in degrees to radians. Translates to ``radians(x)`` in the Godot Shader Language.
  83. - **FUNC_RECIPROCAL** = **28** --- Finds reciprocal value of dividing 1 by ``x`` (i.e. ``1 / x``).
  84. - **FUNC_ROUNDEVEN** = **29** --- Finds the nearest even integer to the parameter. Translates to ``roundEven(x)`` in the Godot Shader Language.
  85. - **FUNC_TRUNC** = **30** --- 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.
  86. - **FUNC_ONEMINUS** = **31** --- Subtracts scalar ``x`` from 1 (i.e. ``1 - x``).
  87. - **FUNC_MAX** = **32** --- Represents the size of the :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` enum.
  88. Property Descriptions
  89. ---------------------
  90. .. _class_VisualShaderNodeFloatFunc_property_function:
  91. - :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **function**
  92. +-----------+---------------------+
  93. | *Default* | ``13`` |
  94. +-----------+---------------------+
  95. | *Setter* | set_function(value) |
  96. +-----------+---------------------+
  97. | *Getter* | get_function() |
  98. +-----------+---------------------+
  99. A function to be applied to the scalar. See :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` for options.
  100. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  101. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  102. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  103. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  104. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  105. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`