:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/VisualShaderNodeTextureParameter.xml. .. _class_VisualShaderNodeTextureParameter: VisualShaderNodeTextureParameter ================================ **Inherits:** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` **Inherited By:** :ref:`VisualShaderNodeCubemapParameter`, :ref:`VisualShaderNodeTexture2DArrayParameter`, :ref:`VisualShaderNodeTexture2DParameter`, :ref:`VisualShaderNodeTexture3DParameter`, :ref:`VisualShaderNodeTextureParameterTriplanar` Performs a uniform texture lookup within the visual shader graph. .. rst-class:: classref-introduction-group Description ----------- Performs a lookup operation on the texture provided as a uniform for the shader. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +---------------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------+ | :ref:`ColorDefault` | :ref:`color_default` | ``0`` | +---------------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------+ | :ref:`TextureFilter` | :ref:`texture_filter` | ``0`` | +---------------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------+ | :ref:`TextureRepeat` | :ref:`texture_repeat` | ``0`` | +---------------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------+ | :ref:`TextureSource` | :ref:`texture_source` | ``0`` | +---------------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------+ | :ref:`TextureType` | :ref:`texture_type` | ``0`` | +---------------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_VisualShaderNodeTextureParameter_TextureType: .. rst-class:: classref-enumeration enum **TextureType**: :ref:`🔗` .. _class_VisualShaderNodeTextureParameter_constant_TYPE_DATA: .. rst-class:: classref-enumeration-constant :ref:`TextureType` **TYPE_DATA** = ``0`` No hints are added to the uniform declaration. .. _class_VisualShaderNodeTextureParameter_constant_TYPE_COLOR: .. rst-class:: classref-enumeration-constant :ref:`TextureType` **TYPE_COLOR** = ``1`` Adds ``source_color`` as hint to the uniform declaration for proper sRGB to linear conversion. .. _class_VisualShaderNodeTextureParameter_constant_TYPE_NORMAL_MAP: .. rst-class:: classref-enumeration-constant :ref:`TextureType` **TYPE_NORMAL_MAP** = ``2`` Adds ``hint_normal`` as hint to the uniform declaration, which internally converts the texture for proper usage as normal map. .. _class_VisualShaderNodeTextureParameter_constant_TYPE_ANISOTROPY: .. rst-class:: classref-enumeration-constant :ref:`TextureType` **TYPE_ANISOTROPY** = ``3`` Adds ``hint_anisotropy`` as hint to the uniform declaration to use for a flowmap. .. _class_VisualShaderNodeTextureParameter_constant_TYPE_MAX: .. rst-class:: classref-enumeration-constant :ref:`TextureType` **TYPE_MAX** = ``4`` Represents the size of the :ref:`TextureType` enum. .. rst-class:: classref-item-separator ---- .. _enum_VisualShaderNodeTextureParameter_ColorDefault: .. rst-class:: classref-enumeration enum **ColorDefault**: :ref:`🔗` .. _class_VisualShaderNodeTextureParameter_constant_COLOR_DEFAULT_WHITE: .. rst-class:: classref-enumeration-constant :ref:`ColorDefault` **COLOR_DEFAULT_WHITE** = ``0`` Defaults to fully opaque white color. .. _class_VisualShaderNodeTextureParameter_constant_COLOR_DEFAULT_BLACK: .. rst-class:: classref-enumeration-constant :ref:`ColorDefault` **COLOR_DEFAULT_BLACK** = ``1`` Defaults to fully opaque black color. .. _class_VisualShaderNodeTextureParameter_constant_COLOR_DEFAULT_TRANSPARENT: .. rst-class:: classref-enumeration-constant :ref:`ColorDefault` **COLOR_DEFAULT_TRANSPARENT** = ``2`` Defaults to fully transparent black color. .. _class_VisualShaderNodeTextureParameter_constant_COLOR_DEFAULT_MAX: .. rst-class:: classref-enumeration-constant :ref:`ColorDefault` **COLOR_DEFAULT_MAX** = ``3`` Represents the size of the :ref:`ColorDefault` enum. .. rst-class:: classref-item-separator ---- .. _enum_VisualShaderNodeTextureParameter_TextureFilter: .. rst-class:: classref-enumeration enum **TextureFilter**: :ref:`🔗` .. _class_VisualShaderNodeTextureParameter_constant_FILTER_DEFAULT: .. rst-class:: classref-enumeration-constant :ref:`TextureFilter` **FILTER_DEFAULT** = ``0`` Sample the texture using the filter determined by the node this shader is attached to. .. _class_VisualShaderNodeTextureParameter_constant_FILTER_NEAREST: .. rst-class:: classref-enumeration-constant :ref:`TextureFilter` **FILTER_NEAREST** = ``1`` The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR: .. rst-class:: classref-enumeration-constant :ref:`TextureFilter` **FILTER_LINEAR** = ``2`` The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_VisualShaderNodeTextureParameter_constant_FILTER_NEAREST_MIPMAP: .. rst-class:: classref-enumeration-constant :ref:`TextureFilter` **FILTER_NEAREST_MIPMAP** = ``3`` The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look pixelated from up close, and smooth from a distance. Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR_MIPMAP: .. rst-class:: classref-enumeration-constant :ref:`TextureFilter` **FILTER_LINEAR_MIPMAP** = ``4`` The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look smooth from up close, and smooth from a distance. Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_VisualShaderNodeTextureParameter_constant_FILTER_NEAREST_MIPMAP_ANISOTROPIC: .. rst-class:: classref-enumeration-constant :ref:`TextureFilter` **FILTER_NEAREST_MIPMAP_ANISOTROPIC** = ``5`` The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. \ **Note:** This texture filter is rarely useful in 2D projects. :ref:`FILTER_NEAREST_MIPMAP` is usually more appropriate in this case. .. _class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR_MIPMAP_ANISOTROPIC: .. rst-class:: classref-enumeration-constant :ref:`TextureFilter` **FILTER_LINEAR_MIPMAP_ANISOTROPIC** = ``6`` The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. \ **Note:** This texture filter is rarely useful in 2D projects. :ref:`FILTER_LINEAR_MIPMAP` is usually more appropriate in this case. .. _class_VisualShaderNodeTextureParameter_constant_FILTER_MAX: .. rst-class:: classref-enumeration-constant :ref:`TextureFilter` **FILTER_MAX** = ``7`` Represents the size of the :ref:`TextureFilter` enum. .. rst-class:: classref-item-separator ---- .. _enum_VisualShaderNodeTextureParameter_TextureRepeat: .. rst-class:: classref-enumeration enum **TextureRepeat**: :ref:`🔗` .. _class_VisualShaderNodeTextureParameter_constant_REPEAT_DEFAULT: .. rst-class:: classref-enumeration-constant :ref:`TextureRepeat` **REPEAT_DEFAULT** = ``0`` Sample the texture using the repeat mode determined by the node this shader is attached to. .. _class_VisualShaderNodeTextureParameter_constant_REPEAT_ENABLED: .. rst-class:: classref-enumeration-constant :ref:`TextureRepeat` **REPEAT_ENABLED** = ``1`` Texture will repeat normally. .. _class_VisualShaderNodeTextureParameter_constant_REPEAT_DISABLED: .. rst-class:: classref-enumeration-constant :ref:`TextureRepeat` **REPEAT_DISABLED** = ``2`` Texture will not repeat. .. _class_VisualShaderNodeTextureParameter_constant_REPEAT_MAX: .. rst-class:: classref-enumeration-constant :ref:`TextureRepeat` **REPEAT_MAX** = ``3`` Represents the size of the :ref:`TextureRepeat` enum. .. rst-class:: classref-item-separator ---- .. _enum_VisualShaderNodeTextureParameter_TextureSource: .. rst-class:: classref-enumeration enum **TextureSource**: :ref:`🔗` .. _class_VisualShaderNodeTextureParameter_constant_SOURCE_NONE: .. rst-class:: classref-enumeration-constant :ref:`TextureSource` **SOURCE_NONE** = ``0`` The texture source is not specified in the shader. .. _class_VisualShaderNodeTextureParameter_constant_SOURCE_SCREEN: .. rst-class:: classref-enumeration-constant :ref:`TextureSource` **SOURCE_SCREEN** = ``1`` The texture source is the screen texture which captures all opaque objects drawn this frame. .. _class_VisualShaderNodeTextureParameter_constant_SOURCE_DEPTH: .. rst-class:: classref-enumeration-constant :ref:`TextureSource` **SOURCE_DEPTH** = ``2`` The texture source is the depth texture from the depth prepass. .. _class_VisualShaderNodeTextureParameter_constant_SOURCE_NORMAL_ROUGHNESS: .. rst-class:: classref-enumeration-constant :ref:`TextureSource` **SOURCE_NORMAL_ROUGHNESS** = ``3`` The texture source is the normal-roughness buffer from the depth prepass. .. _class_VisualShaderNodeTextureParameter_constant_SOURCE_MAX: .. rst-class:: classref-enumeration-constant :ref:`TextureSource` **SOURCE_MAX** = ``4`` Represents the size of the :ref:`TextureSource` enum. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_VisualShaderNodeTextureParameter_property_color_default: .. rst-class:: classref-property :ref:`ColorDefault` **color_default** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_color_default**\ (\ value\: :ref:`ColorDefault`\ ) - :ref:`ColorDefault` **get_color_default**\ (\ ) Sets the default color if no texture is assigned to the uniform. .. rst-class:: classref-item-separator ---- .. _class_VisualShaderNodeTextureParameter_property_texture_filter: .. rst-class:: classref-property :ref:`TextureFilter` **texture_filter** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_texture_filter**\ (\ value\: :ref:`TextureFilter`\ ) - :ref:`TextureFilter` **get_texture_filter**\ (\ ) Sets the texture filtering mode. See :ref:`TextureFilter` for options. .. rst-class:: classref-item-separator ---- .. _class_VisualShaderNodeTextureParameter_property_texture_repeat: .. rst-class:: classref-property :ref:`TextureRepeat` **texture_repeat** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_texture_repeat**\ (\ value\: :ref:`TextureRepeat`\ ) - :ref:`TextureRepeat` **get_texture_repeat**\ (\ ) Sets the texture repeating mode. See :ref:`TextureRepeat` for options. .. rst-class:: classref-item-separator ---- .. _class_VisualShaderNodeTextureParameter_property_texture_source: .. rst-class:: classref-property :ref:`TextureSource` **texture_source** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_texture_source**\ (\ value\: :ref:`TextureSource`\ ) - :ref:`TextureSource` **get_texture_source**\ (\ ) Sets the texture source mode. Used for reading from the screen, depth, or normal_roughness texture. See :ref:`TextureSource` for options. .. rst-class:: classref-item-separator ---- .. _class_VisualShaderNodeTextureParameter_property_texture_type: .. rst-class:: classref-property :ref:`TextureType` **texture_type** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_texture_type**\ (\ value\: :ref:`TextureType`\ ) - :ref:`TextureType` **get_texture_type**\ (\ ) Defines the type of data provided by the 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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`