class_visualshadernodeuvfunc.rst 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 VisualShaderNodeUVFunc.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_VisualShaderNodeUVFunc:
  6. VisualShaderNodeUVFunc
  7. ======================
  8. **Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  9. Contains functions to modify texture coordinates (``uv``) to be used within the visual shader graph.
  10. Properties
  11. ----------
  12. +-------------------------------------------------------+-----------------------------------------------------------------+-------+
  13. | :ref:`Function<enum_VisualShaderNodeUVFunc_Function>` | :ref:`function<class_VisualShaderNodeUVFunc_property_function>` | ``0`` |
  14. +-------------------------------------------------------+-----------------------------------------------------------------+-------+
  15. Enumerations
  16. ------------
  17. .. _enum_VisualShaderNodeUVFunc_Function:
  18. .. _class_VisualShaderNodeUVFunc_constant_FUNC_PANNING:
  19. .. _class_VisualShaderNodeUVFunc_constant_FUNC_SCALING:
  20. .. _class_VisualShaderNodeUVFunc_constant_FUNC_MAX:
  21. enum **Function**:
  22. - **FUNC_PANNING** = **0** --- Translates ``uv`` by using ``scale`` and ``offset`` values using the following formula: ``uv = uv + offset * scale``. ``uv`` port is connected to ``UV`` built-in by default.
  23. - **FUNC_SCALING** = **1** --- Scales ``uv[/uv] by using [code]scale`` and ``pivot`` values using the following formula: ``uv = (uv - pivot) * scale + pivot``. ``uv`` port is connected to ``UV`` built-in by default.
  24. - **FUNC_MAX** = **2** --- Represents the size of the :ref:`Function<enum_VisualShaderNodeUVFunc_Function>` enum.
  25. Property Descriptions
  26. ---------------------
  27. .. _class_VisualShaderNodeUVFunc_property_function:
  28. - :ref:`Function<enum_VisualShaderNodeUVFunc_Function>` **function**
  29. +-----------+---------------------+
  30. | *Default* | ``0`` |
  31. +-----------+---------------------+
  32. | *Setter* | set_function(value) |
  33. +-----------+---------------------+
  34. | *Getter* | get_function() |
  35. +-----------+---------------------+
  36. A function to be applied to the texture coordinates. See :ref:`Function<enum_VisualShaderNodeUVFunc_Function>` for options.
  37. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  38. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  39. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  40. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  41. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  42. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`