class_visualshadernodetextureuniform.rst 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/VisualShaderNodeTextureUniform.xml.
  6. .. _class_VisualShaderNodeTextureUniform:
  7. VisualShaderNodeTextureUniform
  8. ==============================
  9. **Inherits:** :ref:`VisualShaderNodeUniform<class_VisualShaderNodeUniform>` **<** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`VisualShaderNodeCubemapUniform<class_VisualShaderNodeCubemapUniform>`, :ref:`VisualShaderNodeTexture2DArrayUniform<class_VisualShaderNodeTexture2DArrayUniform>`, :ref:`VisualShaderNodeTexture3DUniform<class_VisualShaderNodeTexture3DUniform>`, :ref:`VisualShaderNodeTextureUniformTriplanar<class_VisualShaderNodeTextureUniformTriplanar>`
  11. Performs a uniform texture lookup within the visual shader graph.
  12. Description
  13. -----------
  14. Performs a lookup operation on the texture provided as a uniform for the shader.
  15. Properties
  16. ----------
  17. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------+
  18. | :ref:`ColorDefault<enum_VisualShaderNodeTextureUniform_ColorDefault>` | :ref:`color_default<class_VisualShaderNodeTextureUniform_property_color_default>` | ``0`` |
  19. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------+
  20. | :ref:`TextureFilter<enum_VisualShaderNodeTextureUniform_TextureFilter>` | :ref:`texture_filter<class_VisualShaderNodeTextureUniform_property_texture_filter>` | ``0`` |
  21. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------+
  22. | :ref:`TextureRepeat<enum_VisualShaderNodeTextureUniform_TextureRepeat>` | :ref:`texture_repeat<class_VisualShaderNodeTextureUniform_property_texture_repeat>` | ``0`` |
  23. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------+
  24. | :ref:`TextureType<enum_VisualShaderNodeTextureUniform_TextureType>` | :ref:`texture_type<class_VisualShaderNodeTextureUniform_property_texture_type>` | ``0`` |
  25. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------+
  26. Enumerations
  27. ------------
  28. .. _enum_VisualShaderNodeTextureUniform_TextureType:
  29. .. _class_VisualShaderNodeTextureUniform_constant_TYPE_DATA:
  30. .. _class_VisualShaderNodeTextureUniform_constant_TYPE_COLOR:
  31. .. _class_VisualShaderNodeTextureUniform_constant_TYPE_NORMAL_MAP:
  32. .. _class_VisualShaderNodeTextureUniform_constant_TYPE_ANISOTROPY:
  33. .. _class_VisualShaderNodeTextureUniform_constant_TYPE_MAX:
  34. enum **TextureType**:
  35. - **TYPE_DATA** = **0** --- No hints are added to the uniform declaration.
  36. - **TYPE_COLOR** = **1** --- Adds ``source_color`` as hint to the uniform declaration for proper sRGB to linear conversion.
  37. - **TYPE_NORMAL_MAP** = **2** --- Adds ``hint_normal`` as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
  38. - **TYPE_ANISOTROPY** = **3** --- Adds ``hint_anisotropy`` as hint to the uniform declaration to use for a flowmap.
  39. - **TYPE_MAX** = **4** --- Represents the size of the :ref:`TextureType<enum_VisualShaderNodeTextureUniform_TextureType>` enum.
  40. ----
  41. .. _enum_VisualShaderNodeTextureUniform_ColorDefault:
  42. .. _class_VisualShaderNodeTextureUniform_constant_COLOR_DEFAULT_WHITE:
  43. .. _class_VisualShaderNodeTextureUniform_constant_COLOR_DEFAULT_BLACK:
  44. .. _class_VisualShaderNodeTextureUniform_constant_COLOR_DEFAULT_MAX:
  45. enum **ColorDefault**:
  46. - **COLOR_DEFAULT_WHITE** = **0** --- Defaults to white color.
  47. - **COLOR_DEFAULT_BLACK** = **1** --- Defaults to black color.
  48. - **COLOR_DEFAULT_MAX** = **2** --- Represents the size of the :ref:`ColorDefault<enum_VisualShaderNodeTextureUniform_ColorDefault>` enum.
  49. ----
  50. .. _enum_VisualShaderNodeTextureUniform_TextureFilter:
  51. .. _class_VisualShaderNodeTextureUniform_constant_FILTER_DEFAULT:
  52. .. _class_VisualShaderNodeTextureUniform_constant_FILTER_NEAREST:
  53. .. _class_VisualShaderNodeTextureUniform_constant_FILTER_LINEAR:
  54. .. _class_VisualShaderNodeTextureUniform_constant_FILTER_NEAREST_MIPMAP:
  55. .. _class_VisualShaderNodeTextureUniform_constant_FILTER_LINEAR_MIPMAP:
  56. .. _class_VisualShaderNodeTextureUniform_constant_FILTER_NEAREST_MIPMAP_ANISOTROPIC:
  57. .. _class_VisualShaderNodeTextureUniform_constant_FILTER_LINEAR_MIPMAP_ANISOTROPIC:
  58. .. _class_VisualShaderNodeTextureUniform_constant_FILTER_MAX:
  59. enum **TextureFilter**:
  60. - **FILTER_DEFAULT** = **0**
  61. - **FILTER_NEAREST** = **1**
  62. - **FILTER_LINEAR** = **2**
  63. - **FILTER_NEAREST_MIPMAP** = **3**
  64. - **FILTER_LINEAR_MIPMAP** = **4**
  65. - **FILTER_NEAREST_MIPMAP_ANISOTROPIC** = **5**
  66. - **FILTER_LINEAR_MIPMAP_ANISOTROPIC** = **6**
  67. - **FILTER_MAX** = **7** --- Represents the size of the :ref:`TextureFilter<enum_VisualShaderNodeTextureUniform_TextureFilter>` enum.
  68. ----
  69. .. _enum_VisualShaderNodeTextureUniform_TextureRepeat:
  70. .. _class_VisualShaderNodeTextureUniform_constant_REPEAT_DEFAULT:
  71. .. _class_VisualShaderNodeTextureUniform_constant_REPEAT_ENABLED:
  72. .. _class_VisualShaderNodeTextureUniform_constant_REPEAT_DISABLED:
  73. .. _class_VisualShaderNodeTextureUniform_constant_REPEAT_MAX:
  74. enum **TextureRepeat**:
  75. - **REPEAT_DEFAULT** = **0**
  76. - **REPEAT_ENABLED** = **1**
  77. - **REPEAT_DISABLED** = **2**
  78. - **REPEAT_MAX** = **3** --- Represents the size of the :ref:`TextureRepeat<enum_VisualShaderNodeTextureUniform_TextureRepeat>` enum.
  79. Property Descriptions
  80. ---------------------
  81. .. _class_VisualShaderNodeTextureUniform_property_color_default:
  82. - :ref:`ColorDefault<enum_VisualShaderNodeTextureUniform_ColorDefault>` **color_default**
  83. +-----------+--------------------------+
  84. | *Default* | ``0`` |
  85. +-----------+--------------------------+
  86. | *Setter* | set_color_default(value) |
  87. +-----------+--------------------------+
  88. | *Getter* | get_color_default() |
  89. +-----------+--------------------------+
  90. Sets the default color if no texture is assigned to the uniform.
  91. ----
  92. .. _class_VisualShaderNodeTextureUniform_property_texture_filter:
  93. - :ref:`TextureFilter<enum_VisualShaderNodeTextureUniform_TextureFilter>` **texture_filter**
  94. +-----------+---------------------------+
  95. | *Default* | ``0`` |
  96. +-----------+---------------------------+
  97. | *Setter* | set_texture_filter(value) |
  98. +-----------+---------------------------+
  99. | *Getter* | get_texture_filter() |
  100. +-----------+---------------------------+
  101. Sets the texture filtering mode. See :ref:`TextureFilter<enum_VisualShaderNodeTextureUniform_TextureFilter>` for options.
  102. ----
  103. .. _class_VisualShaderNodeTextureUniform_property_texture_repeat:
  104. - :ref:`TextureRepeat<enum_VisualShaderNodeTextureUniform_TextureRepeat>` **texture_repeat**
  105. +-----------+---------------------------+
  106. | *Default* | ``0`` |
  107. +-----------+---------------------------+
  108. | *Setter* | set_texture_repeat(value) |
  109. +-----------+---------------------------+
  110. | *Getter* | get_texture_repeat() |
  111. +-----------+---------------------------+
  112. Sets the texture repeating mode. See :ref:`TextureRepeat<enum_VisualShaderNodeTextureUniform_TextureRepeat>` for options.
  113. ----
  114. .. _class_VisualShaderNodeTextureUniform_property_texture_type:
  115. - :ref:`TextureType<enum_VisualShaderNodeTextureUniform_TextureType>` **texture_type**
  116. +-----------+-------------------------+
  117. | *Default* | ``0`` |
  118. +-----------+-------------------------+
  119. | *Setter* | set_texture_type(value) |
  120. +-----------+-------------------------+
  121. | *Getter* | get_texture_type() |
  122. +-----------+-------------------------+
  123. Defines the type of data provided by the source texture. See :ref:`TextureType<enum_VisualShaderNodeTextureUniform_TextureType>` for options.
  124. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  125. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  126. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  127. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  128. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  129. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`