class_visualshadernodetexture.rst 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/VisualShaderNodeTexture.xml.
  6. .. _class_VisualShaderNodeTexture:
  7. VisualShaderNodeTexture
  8. =======================
  9. **Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. Performs a texture lookup within the visual shader graph.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Performs a lookup operation on the provided texture, with support for multiple texture sources to choose from.
  15. .. rst-class:: classref-reftable-group
  16. Properties
  17. ----------
  18. .. table::
  19. :widths: auto
  20. +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+
  21. | :ref:`Source<enum_VisualShaderNodeTexture_Source>` | :ref:`source<class_VisualShaderNodeTexture_property_source>` | ``0`` |
  22. +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+
  23. | :ref:`Texture<class_Texture>` | :ref:`texture<class_VisualShaderNodeTexture_property_texture>` | |
  24. +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+
  25. | :ref:`TextureType<enum_VisualShaderNodeTexture_TextureType>` | :ref:`texture_type<class_VisualShaderNodeTexture_property_texture_type>` | ``0`` |
  26. +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+
  27. .. rst-class:: classref-section-separator
  28. ----
  29. .. rst-class:: classref-descriptions-group
  30. Enumerations
  31. ------------
  32. .. _enum_VisualShaderNodeTexture_Source:
  33. .. rst-class:: classref-enumeration
  34. enum **Source**:
  35. .. _class_VisualShaderNodeTexture_constant_SOURCE_TEXTURE:
  36. .. rst-class:: classref-enumeration-constant
  37. :ref:`Source<enum_VisualShaderNodeTexture_Source>` **SOURCE_TEXTURE** = ``0``
  38. Use the texture given as an argument for this function.
  39. .. _class_VisualShaderNodeTexture_constant_SOURCE_SCREEN:
  40. .. rst-class:: classref-enumeration-constant
  41. :ref:`Source<enum_VisualShaderNodeTexture_Source>` **SOURCE_SCREEN** = ``1``
  42. Use the current viewport's texture as the source.
  43. .. _class_VisualShaderNodeTexture_constant_SOURCE_2D_TEXTURE:
  44. .. rst-class:: classref-enumeration-constant
  45. :ref:`Source<enum_VisualShaderNodeTexture_Source>` **SOURCE_2D_TEXTURE** = ``2``
  46. Use the texture from this shader's texture built-in (e.g. a texture of a :ref:`Sprite<class_Sprite>`).
  47. .. _class_VisualShaderNodeTexture_constant_SOURCE_2D_NORMAL:
  48. .. rst-class:: classref-enumeration-constant
  49. :ref:`Source<enum_VisualShaderNodeTexture_Source>` **SOURCE_2D_NORMAL** = ``3``
  50. Use the texture from this shader's normal map built-in.
  51. .. _class_VisualShaderNodeTexture_constant_SOURCE_DEPTH:
  52. .. rst-class:: classref-enumeration-constant
  53. :ref:`Source<enum_VisualShaderNodeTexture_Source>` **SOURCE_DEPTH** = ``4``
  54. Use the depth texture available for this shader.
  55. .. _class_VisualShaderNodeTexture_constant_SOURCE_PORT:
  56. .. rst-class:: classref-enumeration-constant
  57. :ref:`Source<enum_VisualShaderNodeTexture_Source>` **SOURCE_PORT** = ``5``
  58. Use the texture provided in the input port for this function.
  59. .. rst-class:: classref-item-separator
  60. ----
  61. .. _enum_VisualShaderNodeTexture_TextureType:
  62. .. rst-class:: classref-enumeration
  63. enum **TextureType**:
  64. .. _class_VisualShaderNodeTexture_constant_TYPE_DATA:
  65. .. rst-class:: classref-enumeration-constant
  66. :ref:`TextureType<enum_VisualShaderNodeTexture_TextureType>` **TYPE_DATA** = ``0``
  67. No hints are added to the uniform declaration.
  68. .. _class_VisualShaderNodeTexture_constant_TYPE_COLOR:
  69. .. rst-class:: classref-enumeration-constant
  70. :ref:`TextureType<enum_VisualShaderNodeTexture_TextureType>` **TYPE_COLOR** = ``1``
  71. Adds ``hint_albedo`` as hint to the uniform declaration for proper sRGB to linear conversion.
  72. .. _class_VisualShaderNodeTexture_constant_TYPE_NORMALMAP:
  73. .. rst-class:: classref-enumeration-constant
  74. :ref:`TextureType<enum_VisualShaderNodeTexture_TextureType>` **TYPE_NORMALMAP** = ``2``
  75. Adds ``hint_normal`` as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
  76. .. rst-class:: classref-section-separator
  77. ----
  78. .. rst-class:: classref-descriptions-group
  79. Property Descriptions
  80. ---------------------
  81. .. _class_VisualShaderNodeTexture_property_source:
  82. .. rst-class:: classref-property
  83. :ref:`Source<enum_VisualShaderNodeTexture_Source>` **source** = ``0``
  84. .. rst-class:: classref-property-setget
  85. - void **set_source** **(** :ref:`Source<enum_VisualShaderNodeTexture_Source>` value **)**
  86. - :ref:`Source<enum_VisualShaderNodeTexture_Source>` **get_source** **(** **)**
  87. Determines the source for the lookup. See :ref:`Source<enum_VisualShaderNodeTexture_Source>` for options.
  88. .. rst-class:: classref-item-separator
  89. ----
  90. .. _class_VisualShaderNodeTexture_property_texture:
  91. .. rst-class:: classref-property
  92. :ref:`Texture<class_Texture>` **texture**
  93. .. rst-class:: classref-property-setget
  94. - void **set_texture** **(** :ref:`Texture<class_Texture>` value **)**
  95. - :ref:`Texture<class_Texture>` **get_texture** **(** **)**
  96. The source texture, if needed for the selected :ref:`source<class_VisualShaderNodeTexture_property_source>`.
  97. .. rst-class:: classref-item-separator
  98. ----
  99. .. _class_VisualShaderNodeTexture_property_texture_type:
  100. .. rst-class:: classref-property
  101. :ref:`TextureType<enum_VisualShaderNodeTexture_TextureType>` **texture_type** = ``0``
  102. .. rst-class:: classref-property-setget
  103. - void **set_texture_type** **(** :ref:`TextureType<enum_VisualShaderNodeTexture_TextureType>` value **)**
  104. - :ref:`TextureType<enum_VisualShaderNodeTexture_TextureType>` **get_texture_type** **(** **)**
  105. Specifies the type of the texture if :ref:`source<class_VisualShaderNodeTexture_property_source>` is set to :ref:`SOURCE_TEXTURE<class_VisualShaderNodeTexture_constant_SOURCE_TEXTURE>`. See :ref:`TextureType<enum_VisualShaderNodeTexture_TextureType>` for options.
  106. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  107. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  108. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  109. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`