class_visualshadernodetextureuniform.rst 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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:`TextureFilter<enum_VisualShaderNodeTextureUniform_TextureFilter>` | :ref:`texture_filter<class_VisualShaderNodeTextureUniform_property_texture_filter>` | ``0`` |
  20. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------+
  21. | :ref:`TextureRepeat<enum_VisualShaderNodeTextureUniform_TextureRepeat>` | :ref:`texture_repeat<class_VisualShaderNodeTextureUniform_property_texture_repeat>` | ``0`` |
  22. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------+
  23. | :ref:`TextureType<enum_VisualShaderNodeTextureUniform_TextureType>` | :ref:`texture_type<class_VisualShaderNodeTextureUniform_property_texture_type>` | ``0`` |
  24. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------+
  25. Enumerations
  26. ------------
  27. .. _enum_VisualShaderNodeTextureUniform_TextureType:
  28. .. _class_VisualShaderNodeTextureUniform_constant_TYPE_DATA:
  29. .. _class_VisualShaderNodeTextureUniform_constant_TYPE_COLOR:
  30. .. _class_VisualShaderNodeTextureUniform_constant_TYPE_NORMAL_MAP:
  31. .. _class_VisualShaderNodeTextureUniform_constant_TYPE_ANISOTROPY:
  32. .. _class_VisualShaderNodeTextureUniform_constant_TYPE_MAX:
  33. enum **TextureType**:
  34. - **TYPE_DATA** = **0** --- No hints are added to the uniform declaration.
  35. - **TYPE_COLOR** = **1** --- Adds ``hint_albedo`` as hint to the uniform declaration for proper sRGB to linear conversion.
  36. - **TYPE_NORMAL_MAP** = **2** --- Adds ``hint_normal`` as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
  37. - **TYPE_ANISOTROPY** = **3** --- Adds ``hint_anisotropy`` as hint to the uniform declaration to use for a flowmap.
  38. - **TYPE_MAX** = **4** --- Represents the size of the :ref:`TextureType<enum_VisualShaderNodeTextureUniform_TextureType>` enum.
  39. ----
  40. .. _enum_VisualShaderNodeTextureUniform_ColorDefault:
  41. .. _class_VisualShaderNodeTextureUniform_constant_COLOR_DEFAULT_WHITE:
  42. .. _class_VisualShaderNodeTextureUniform_constant_COLOR_DEFAULT_BLACK:
  43. .. _class_VisualShaderNodeTextureUniform_constant_COLOR_DEFAULT_MAX:
  44. enum **ColorDefault**:
  45. - **COLOR_DEFAULT_WHITE** = **0** --- Defaults to white color.
  46. - **COLOR_DEFAULT_BLACK** = **1** --- Defaults to black color.
  47. - **COLOR_DEFAULT_MAX** = **2** --- Represents the size of the :ref:`ColorDefault<enum_VisualShaderNodeTextureUniform_ColorDefault>` enum.
  48. ----
  49. .. _enum_VisualShaderNodeTextureUniform_TextureFilter:
  50. .. _class_VisualShaderNodeTextureUniform_constant_FILTER_DEFAULT:
  51. .. _class_VisualShaderNodeTextureUniform_constant_FILTER_NEAREST:
  52. .. _class_VisualShaderNodeTextureUniform_constant_FILTER_LINEAR:
  53. .. _class_VisualShaderNodeTextureUniform_constant_FILTER_NEAREST_MIPMAP:
  54. .. _class_VisualShaderNodeTextureUniform_constant_FILTER_LINEAR_MIPMAP:
  55. .. _class_VisualShaderNodeTextureUniform_constant_FILTER_NEAREST_MIPMAP_ANISOTROPIC:
  56. .. _class_VisualShaderNodeTextureUniform_constant_FILTER_LINEAR_MIPMAP_ANISOTROPIC:
  57. .. _class_VisualShaderNodeTextureUniform_constant_FILTER_MAX:
  58. enum **TextureFilter**:
  59. - **FILTER_DEFAULT** = **0**
  60. - **FILTER_NEAREST** = **1**
  61. - **FILTER_LINEAR** = **2**
  62. - **FILTER_NEAREST_MIPMAP** = **3**
  63. - **FILTER_LINEAR_MIPMAP** = **4**
  64. - **FILTER_NEAREST_MIPMAP_ANISOTROPIC** = **5**
  65. - **FILTER_LINEAR_MIPMAP_ANISOTROPIC** = **6**
  66. - **FILTER_MAX** = **7** --- Represents the size of the :ref:`TextureFilter<enum_VisualShaderNodeTextureUniform_TextureFilter>` enum.
  67. ----
  68. .. _enum_VisualShaderNodeTextureUniform_TextureRepeat:
  69. .. _class_VisualShaderNodeTextureUniform_constant_REPEAT_DEFAULT:
  70. .. _class_VisualShaderNodeTextureUniform_constant_REPEAT_ENABLED:
  71. .. _class_VisualShaderNodeTextureUniform_constant_REPEAT_DISABLED:
  72. .. _class_VisualShaderNodeTextureUniform_constant_REPEAT_MAX:
  73. enum **TextureRepeat**:
  74. - **REPEAT_DEFAULT** = **0**
  75. - **REPEAT_ENABLED** = **1**
  76. - **REPEAT_DISABLED** = **2**
  77. - **REPEAT_MAX** = **3** --- Represents the size of the :ref:`TextureRepeat<enum_VisualShaderNodeTextureUniform_TextureRepeat>` enum.
  78. Property Descriptions
  79. ---------------------
  80. .. _class_VisualShaderNodeTextureUniform_property_color_default:
  81. - :ref:`ColorDefault<enum_VisualShaderNodeTextureUniform_ColorDefault>` **color_default**
  82. +-----------+--------------------------+
  83. | *Default* | ``0`` |
  84. +-----------+--------------------------+
  85. | *Setter* | set_color_default(value) |
  86. +-----------+--------------------------+
  87. | *Getter* | get_color_default() |
  88. +-----------+--------------------------+
  89. Sets the default color if no texture is assigned to the uniform.
  90. ----
  91. .. _class_VisualShaderNodeTextureUniform_property_texture_filter:
  92. - :ref:`TextureFilter<enum_VisualShaderNodeTextureUniform_TextureFilter>` **texture_filter**
  93. +-----------+---------------------------+
  94. | *Default* | ``0`` |
  95. +-----------+---------------------------+
  96. | *Setter* | set_texture_filter(value) |
  97. +-----------+---------------------------+
  98. | *Getter* | get_texture_filter() |
  99. +-----------+---------------------------+
  100. Sets the texture filtering mode. See :ref:`TextureFilter<enum_VisualShaderNodeTextureUniform_TextureFilter>` for options.
  101. ----
  102. .. _class_VisualShaderNodeTextureUniform_property_texture_repeat:
  103. - :ref:`TextureRepeat<enum_VisualShaderNodeTextureUniform_TextureRepeat>` **texture_repeat**
  104. +-----------+---------------------------+
  105. | *Default* | ``0`` |
  106. +-----------+---------------------------+
  107. | *Setter* | set_texture_repeat(value) |
  108. +-----------+---------------------------+
  109. | *Getter* | get_texture_repeat() |
  110. +-----------+---------------------------+
  111. Sets the texture repeating mode. See :ref:`TextureRepeat<enum_VisualShaderNodeTextureUniform_TextureRepeat>` for options.
  112. ----
  113. .. _class_VisualShaderNodeTextureUniform_property_texture_type:
  114. - :ref:`TextureType<enum_VisualShaderNodeTextureUniform_TextureType>` **texture_type**
  115. +-----------+-------------------------+
  116. | *Default* | ``0`` |
  117. +-----------+-------------------------+
  118. | *Setter* | set_texture_type(value) |
  119. +-----------+-------------------------+
  120. | *Getter* | get_texture_type() |
  121. +-----------+-------------------------+
  122. Defines the type of data provided by the source texture. See :ref:`TextureType<enum_VisualShaderNodeTextureUniform_TextureType>` for options.
  123. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  124. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  125. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  126. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  127. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  128. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`