class_visualshadernodetextureuniform.rst 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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 VisualShaderNodeTextureUniform.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_VisualShaderNodeTextureUniform:
  6. VisualShaderNodeTextureUniform
  7. ==============================
  8. **Inherits:** :ref:`VisualShaderNodeUniform<class_VisualShaderNodeUniform>` **<** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  9. **Inherited By:** :ref:`VisualShaderNodeCubemapUniform<class_VisualShaderNodeCubemapUniform>`, :ref:`VisualShaderNodeTexture2DArrayUniform<class_VisualShaderNodeTexture2DArrayUniform>`, :ref:`VisualShaderNodeTexture3DUniform<class_VisualShaderNodeTexture3DUniform>`, :ref:`VisualShaderNodeTextureUniformTriplanar<class_VisualShaderNodeTextureUniformTriplanar>`
  10. Performs a uniform texture lookup within the visual shader graph.
  11. Description
  12. -----------
  13. Performs a lookup operation on the texture provided as a uniform for the shader.
  14. Properties
  15. ----------
  16. +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-------+
  17. | :ref:`ColorDefault<enum_VisualShaderNodeTextureUniform_ColorDefault>` | :ref:`color_default<class_VisualShaderNodeTextureUniform_property_color_default>` | ``0`` |
  18. +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-------+
  19. | :ref:`TextureType<enum_VisualShaderNodeTextureUniform_TextureType>` | :ref:`texture_type<class_VisualShaderNodeTextureUniform_property_texture_type>` | ``0`` |
  20. +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-------+
  21. Enumerations
  22. ------------
  23. .. _enum_VisualShaderNodeTextureUniform_TextureType:
  24. .. _class_VisualShaderNodeTextureUniform_constant_TYPE_DATA:
  25. .. _class_VisualShaderNodeTextureUniform_constant_TYPE_COLOR:
  26. .. _class_VisualShaderNodeTextureUniform_constant_TYPE_NORMAL_MAP:
  27. .. _class_VisualShaderNodeTextureUniform_constant_TYPE_ANISO:
  28. .. _class_VisualShaderNodeTextureUniform_constant_TYPE_MAX:
  29. enum **TextureType**:
  30. - **TYPE_DATA** = **0** --- No hints are added to the uniform declaration.
  31. - **TYPE_COLOR** = **1** --- Adds ``hint_albedo`` as hint to the uniform declaration for proper sRGB to linear conversion.
  32. - **TYPE_NORMAL_MAP** = **2** --- Adds ``hint_normal`` as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
  33. - **TYPE_ANISO** = **3** --- Adds ``hint_aniso`` as hint to the uniform declaration to use for a flowmap.
  34. - **TYPE_MAX** = **4** --- Represents the size of the :ref:`TextureType<enum_VisualShaderNodeTextureUniform_TextureType>` enum.
  35. ----
  36. .. _enum_VisualShaderNodeTextureUniform_ColorDefault:
  37. .. _class_VisualShaderNodeTextureUniform_constant_COLOR_DEFAULT_WHITE:
  38. .. _class_VisualShaderNodeTextureUniform_constant_COLOR_DEFAULT_BLACK:
  39. .. _class_VisualShaderNodeTextureUniform_constant_COLOR_DEFAULT_MAX:
  40. enum **ColorDefault**:
  41. - **COLOR_DEFAULT_WHITE** = **0** --- Defaults to white color.
  42. - **COLOR_DEFAULT_BLACK** = **1** --- Defaults to black color.
  43. - **COLOR_DEFAULT_MAX** = **2** --- Represents the size of the :ref:`ColorDefault<enum_VisualShaderNodeTextureUniform_ColorDefault>` enum.
  44. Property Descriptions
  45. ---------------------
  46. .. _class_VisualShaderNodeTextureUniform_property_color_default:
  47. - :ref:`ColorDefault<enum_VisualShaderNodeTextureUniform_ColorDefault>` **color_default**
  48. +-----------+--------------------------+
  49. | *Default* | ``0`` |
  50. +-----------+--------------------------+
  51. | *Setter* | set_color_default(value) |
  52. +-----------+--------------------------+
  53. | *Getter* | get_color_default() |
  54. +-----------+--------------------------+
  55. Sets the default color if no texture is assigned to the uniform.
  56. ----
  57. .. _class_VisualShaderNodeTextureUniform_property_texture_type:
  58. - :ref:`TextureType<enum_VisualShaderNodeTextureUniform_TextureType>` **texture_type**
  59. +-----------+-------------------------+
  60. | *Default* | ``0`` |
  61. +-----------+-------------------------+
  62. | *Setter* | set_texture_type(value) |
  63. +-----------+-------------------------+
  64. | *Getter* | get_texture_type() |
  65. +-----------+-------------------------+
  66. Defines the type of data provided by the source texture. See :ref:`TextureType<enum_VisualShaderNodeTextureUniform_TextureType>` for options.
  67. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  68. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  69. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  70. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  71. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  72. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`