:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/VisualShaderNodeTexture.xml. .. _class_VisualShaderNodeTexture: VisualShaderNodeTexture ======================= **Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` Performs a texture lookup within the visual shader graph. .. rst-class:: classref-introduction-group Description ----------- Performs a lookup operation on the provided texture, with support for multiple texture sources to choose from. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ | :ref:`Source` | :ref:`source` | ``0`` | +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ | :ref:`Texture` | :ref:`texture` | | +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ | :ref:`TextureType` | :ref:`texture_type` | ``0`` | +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeTexture_Source: .. rst-class:: classref-enumeration enum **Source**: .. _class_VisualShaderNodeTexture_constant_SOURCE_TEXTURE: .. rst-class:: classref-enumeration-constant :ref:`Source` **SOURCE_TEXTURE** = ``0`` Use the texture given as an argument for this function. .. _class_VisualShaderNodeTexture_constant_SOURCE_SCREEN: .. rst-class:: classref-enumeration-constant :ref:`Source` **SOURCE_SCREEN** = ``1`` Use the current viewport's texture as the source. .. _class_VisualShaderNodeTexture_constant_SOURCE_2D_TEXTURE: .. rst-class:: classref-enumeration-constant :ref:`Source` **SOURCE_2D_TEXTURE** = ``2`` Use the texture from this shader's texture built-in (e.g. a texture of a :ref:`Sprite`). .. _class_VisualShaderNodeTexture_constant_SOURCE_2D_NORMAL: .. rst-class:: classref-enumeration-constant :ref:`Source` **SOURCE_2D_NORMAL** = ``3`` Use the texture from this shader's normal map built-in. .. _class_VisualShaderNodeTexture_constant_SOURCE_DEPTH: .. rst-class:: classref-enumeration-constant :ref:`Source` **SOURCE_DEPTH** = ``4`` Use the depth texture available for this shader. .. _class_VisualShaderNodeTexture_constant_SOURCE_PORT: .. rst-class:: classref-enumeration-constant :ref:`Source` **SOURCE_PORT** = ``5`` Use the texture provided in the input port for this function. .. rst-class:: classref-item-separator ---- .. _enum_VisualShaderNodeTexture_TextureType: .. rst-class:: classref-enumeration enum **TextureType**: .. _class_VisualShaderNodeTexture_constant_TYPE_DATA: .. rst-class:: classref-enumeration-constant :ref:`TextureType` **TYPE_DATA** = ``0`` No hints are added to the uniform declaration. .. _class_VisualShaderNodeTexture_constant_TYPE_COLOR: .. rst-class:: classref-enumeration-constant :ref:`TextureType` **TYPE_COLOR** = ``1`` Adds ``hint_albedo`` as hint to the uniform declaration for proper sRGB to linear conversion. .. _class_VisualShaderNodeTexture_constant_TYPE_NORMALMAP: .. rst-class:: classref-enumeration-constant :ref:`TextureType` **TYPE_NORMALMAP** = ``2`` Adds ``hint_normal`` as hint to the uniform declaration, which internally converts the texture for proper usage as normal map. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeTexture_property_source: .. rst-class:: classref-property :ref:`Source` **source** = ``0`` .. rst-class:: classref-property-setget - void **set_source** **(** :ref:`Source` value **)** - :ref:`Source` **get_source** **(** **)** Determines the source for the lookup. See :ref:`Source` for options. .. rst-class:: classref-item-separator ---- .. _class_VisualShaderNodeTexture_property_texture: .. rst-class:: classref-property :ref:`Texture` **texture** .. rst-class:: classref-property-setget - void **set_texture** **(** :ref:`Texture` value **)** - :ref:`Texture` **get_texture** **(** **)** The source texture, if needed for the selected :ref:`source`. .. rst-class:: classref-item-separator ---- .. _class_VisualShaderNodeTexture_property_texture_type: .. rst-class:: classref-property :ref:`TextureType` **texture_type** = ``0`` .. rst-class:: classref-property-setget - void **set_texture_type** **(** :ref:`TextureType` value **)** - :ref:`TextureType` **get_texture_type** **(** **)** Specifies the type of the texture if :ref:`source` is set to :ref:`SOURCE_TEXTURE`. See :ref:`TextureType` for options. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`