class_visualshadernodeintfunc.rst 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 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:`Reference<class_Reference>` **<** :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>` | ``3`` |
  17. +--------------------------------------------------------+------------------------------------------------------------------+-------+
  18. Enumerations
  19. ------------
  20. .. _enum_VisualShaderNodeIntFunc_Function:
  21. .. _class_VisualShaderNodeIntFunc_constant_FUNC_ABS:
  22. .. _class_VisualShaderNodeIntFunc_constant_FUNC_CLAMP:
  23. .. _class_VisualShaderNodeIntFunc_constant_FUNC_NEGATE:
  24. .. _class_VisualShaderNodeIntFunc_constant_FUNC_SIGN:
  25. enum **Function**:
  26. - **FUNC_ABS** = **0** --- Returns the absolute value of the parameter. Translates to ``abs(x)`` in the Godot Shader Language.
  27. - **FUNC_CLAMP** = **1** --- Constrains a parameter between ``min`` and ``max``. Translates to ``clamp(x, min, max)`` in the Godot Shader Language.
  28. - **FUNC_NEGATE** = **2** --- Negates the ``x`` using ``-(x)``.
  29. - **FUNC_SIGN** = **3** --- Extracts the sign of the parameter. Translates to ``sign(x)`` in the Godot Shader Language.
  30. Property Descriptions
  31. ---------------------
  32. .. _class_VisualShaderNodeIntFunc_property_function:
  33. - :ref:`Function<enum_VisualShaderNodeIntFunc_Function>` **function**
  34. +-----------+---------------------+
  35. | *Default* | ``3`` |
  36. +-----------+---------------------+
  37. | *Setter* | set_function(value) |
  38. +-----------+---------------------+
  39. | *Getter* | get_function() |
  40. +-----------+---------------------+
  41. A function to be applied to the scalar. See :ref:`Function<enum_VisualShaderNodeIntFunc_Function>` for options.