class_visualshadernodeintfunc.rst 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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 VisualShaderNodeIntFunc.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_VisualShaderNodeIntFunc:
  6. VisualShaderNodeIntFunc
  7. =======================
  8. **Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  9. A scalar integer function to be used within the visual shader graph.
  10. Description
  11. -----------
  12. Accept an integer scalar (``x``) to the input port and transform it according to :ref:`function<class_VisualShaderNodeIntFunc_property_function>`.
  13. Properties
  14. ----------
  15. +--------------------------------------------------------+------------------------------------------------------------------+-------+
  16. | :ref:`Function<enum_VisualShaderNodeIntFunc_Function>` | :ref:`function<class_VisualShaderNodeIntFunc_property_function>` | ``2`` |
  17. +--------------------------------------------------------+------------------------------------------------------------------+-------+
  18. Enumerations
  19. ------------
  20. .. _enum_VisualShaderNodeIntFunc_Function:
  21. .. _class_VisualShaderNodeIntFunc_constant_FUNC_ABS:
  22. .. _class_VisualShaderNodeIntFunc_constant_FUNC_NEGATE:
  23. .. _class_VisualShaderNodeIntFunc_constant_FUNC_SIGN:
  24. .. _class_VisualShaderNodeIntFunc_constant_FUNC_BITWISE_NOT:
  25. .. _class_VisualShaderNodeIntFunc_constant_FUNC_MAX:
  26. enum **Function**:
  27. - **FUNC_ABS** = **0** --- Returns the absolute value of the parameter. Translates to ``abs(x)`` in the Godot Shader Language.
  28. - **FUNC_NEGATE** = **1** --- Negates the ``x`` using ``-(x)``.
  29. - **FUNC_SIGN** = **2** --- Extracts the sign of the parameter. Translates to ``sign(x)`` in the Godot Shader Language.
  30. - **FUNC_BITWISE_NOT** = **3** --- Returns the result of bitwise ``NOT`` operation on the integer. Translates to ``~a`` in the Godot Shader Language.
  31. - **FUNC_MAX** = **4** --- Represents the size of the :ref:`Function<enum_VisualShaderNodeIntFunc_Function>` enum.
  32. Property Descriptions
  33. ---------------------
  34. .. _class_VisualShaderNodeIntFunc_property_function:
  35. - :ref:`Function<enum_VisualShaderNodeIntFunc_Function>` **function**
  36. +-----------+---------------------+
  37. | *Default* | ``2`` |
  38. +-----------+---------------------+
  39. | *Setter* | set_function(value) |
  40. +-----------+---------------------+
  41. | *Getter* | get_function() |
  42. +-----------+---------------------+
  43. A function to be applied to the scalar. See :ref:`Function<enum_VisualShaderNodeIntFunc_Function>` for options.
  44. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  45. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  46. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  47. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  48. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  49. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`