123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/4.3/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/4.3/doc/classes/VisualShaderNodeTextureParameter.xml.
- .. _class_VisualShaderNodeTextureParameter:
- VisualShaderNodeTextureParameter
- ================================
- **Inherits:** :ref:`VisualShaderNodeParameter<class_VisualShaderNodeParameter>` **<** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
- **Inherited By:** :ref:`VisualShaderNodeCubemapParameter<class_VisualShaderNodeCubemapParameter>`, :ref:`VisualShaderNodeTexture2DArrayParameter<class_VisualShaderNodeTexture2DArrayParameter>`, :ref:`VisualShaderNodeTexture2DParameter<class_VisualShaderNodeTexture2DParameter>`, :ref:`VisualShaderNodeTexture3DParameter<class_VisualShaderNodeTexture3DParameter>`, :ref:`VisualShaderNodeTextureParameterTriplanar<class_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<enum_VisualShaderNodeTextureParameter_ColorDefault>` | :ref:`color_default<class_VisualShaderNodeTextureParameter_property_color_default>` | ``0`` |
- +---------------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------+
- | :ref:`TextureFilter<enum_VisualShaderNodeTextureParameter_TextureFilter>` | :ref:`texture_filter<class_VisualShaderNodeTextureParameter_property_texture_filter>` | ``0`` |
- +---------------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------+
- | :ref:`TextureRepeat<enum_VisualShaderNodeTextureParameter_TextureRepeat>` | :ref:`texture_repeat<class_VisualShaderNodeTextureParameter_property_texture_repeat>` | ``0`` |
- +---------------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------+
- | :ref:`TextureSource<enum_VisualShaderNodeTextureParameter_TextureSource>` | :ref:`texture_source<class_VisualShaderNodeTextureParameter_property_texture_source>` | ``0`` |
- +---------------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------+
- | :ref:`TextureType<enum_VisualShaderNodeTextureParameter_TextureType>` | :ref:`texture_type<class_VisualShaderNodeTextureParameter_property_texture_type>` | ``0`` |
- +---------------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Enumerations
- ------------
- .. _enum_VisualShaderNodeTextureParameter_TextureType:
- .. rst-class:: classref-enumeration
- enum **TextureType**: :ref:`🔗<enum_VisualShaderNodeTextureParameter_TextureType>`
- .. _class_VisualShaderNodeTextureParameter_constant_TYPE_DATA:
- .. rst-class:: classref-enumeration-constant
- :ref:`TextureType<enum_VisualShaderNodeTextureParameter_TextureType>` **TYPE_DATA** = ``0``
- No hints are added to the uniform declaration.
- .. _class_VisualShaderNodeTextureParameter_constant_TYPE_COLOR:
- .. rst-class:: classref-enumeration-constant
- :ref:`TextureType<enum_VisualShaderNodeTextureParameter_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<enum_VisualShaderNodeTextureParameter_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<enum_VisualShaderNodeTextureParameter_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<enum_VisualShaderNodeTextureParameter_TextureType>` **TYPE_MAX** = ``4``
- Represents the size of the :ref:`TextureType<enum_VisualShaderNodeTextureParameter_TextureType>` enum.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_VisualShaderNodeTextureParameter_ColorDefault:
- .. rst-class:: classref-enumeration
- enum **ColorDefault**: :ref:`🔗<enum_VisualShaderNodeTextureParameter_ColorDefault>`
- .. _class_VisualShaderNodeTextureParameter_constant_COLOR_DEFAULT_WHITE:
- .. rst-class:: classref-enumeration-constant
- :ref:`ColorDefault<enum_VisualShaderNodeTextureParameter_ColorDefault>` **COLOR_DEFAULT_WHITE** = ``0``
- Defaults to fully opaque white color.
- .. _class_VisualShaderNodeTextureParameter_constant_COLOR_DEFAULT_BLACK:
- .. rst-class:: classref-enumeration-constant
- :ref:`ColorDefault<enum_VisualShaderNodeTextureParameter_ColorDefault>` **COLOR_DEFAULT_BLACK** = ``1``
- Defaults to fully opaque black color.
- .. _class_VisualShaderNodeTextureParameter_constant_COLOR_DEFAULT_TRANSPARENT:
- .. rst-class:: classref-enumeration-constant
- :ref:`ColorDefault<enum_VisualShaderNodeTextureParameter_ColorDefault>` **COLOR_DEFAULT_TRANSPARENT** = ``2``
- Defaults to fully transparent black color.
- .. _class_VisualShaderNodeTextureParameter_constant_COLOR_DEFAULT_MAX:
- .. rst-class:: classref-enumeration-constant
- :ref:`ColorDefault<enum_VisualShaderNodeTextureParameter_ColorDefault>` **COLOR_DEFAULT_MAX** = ``3``
- Represents the size of the :ref:`ColorDefault<enum_VisualShaderNodeTextureParameter_ColorDefault>` enum.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_VisualShaderNodeTextureParameter_TextureFilter:
- .. rst-class:: classref-enumeration
- enum **TextureFilter**: :ref:`🔗<enum_VisualShaderNodeTextureParameter_TextureFilter>`
- .. _class_VisualShaderNodeTextureParameter_constant_FILTER_DEFAULT:
- .. rst-class:: classref-enumeration-constant
- :ref:`TextureFilter<enum_VisualShaderNodeTextureParameter_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<enum_VisualShaderNodeTextureParameter_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<enum_VisualShaderNodeTextureParameter_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<enum_VisualShaderNodeTextureParameter_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<class_ProjectSettings_property_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<class_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<enum_VisualShaderNodeTextureParameter_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<class_ProjectSettings_property_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<class_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<enum_VisualShaderNodeTextureParameter_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<class_ProjectSettings_property_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<class_ProjectSettings_property_rendering/textures/default_filters/anisotropic_filtering_level>`.
- \ **Note:** This texture filter is rarely useful in 2D projects. :ref:`FILTER_NEAREST_MIPMAP<class_VisualShaderNodeTextureParameter_constant_FILTER_NEAREST_MIPMAP>` is usually more appropriate in this case.
- .. _class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR_MIPMAP_ANISOTROPIC:
- .. rst-class:: classref-enumeration-constant
- :ref:`TextureFilter<enum_VisualShaderNodeTextureParameter_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<class_ProjectSettings_property_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<class_ProjectSettings_property_rendering/textures/default_filters/anisotropic_filtering_level>`.
- \ **Note:** This texture filter is rarely useful in 2D projects. :ref:`FILTER_LINEAR_MIPMAP<class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR_MIPMAP>` is usually more appropriate in this case.
- .. _class_VisualShaderNodeTextureParameter_constant_FILTER_MAX:
- .. rst-class:: classref-enumeration-constant
- :ref:`TextureFilter<enum_VisualShaderNodeTextureParameter_TextureFilter>` **FILTER_MAX** = ``7``
- Represents the size of the :ref:`TextureFilter<enum_VisualShaderNodeTextureParameter_TextureFilter>` enum.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_VisualShaderNodeTextureParameter_TextureRepeat:
- .. rst-class:: classref-enumeration
- enum **TextureRepeat**: :ref:`🔗<enum_VisualShaderNodeTextureParameter_TextureRepeat>`
- .. _class_VisualShaderNodeTextureParameter_constant_REPEAT_DEFAULT:
- .. rst-class:: classref-enumeration-constant
- :ref:`TextureRepeat<enum_VisualShaderNodeTextureParameter_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<enum_VisualShaderNodeTextureParameter_TextureRepeat>` **REPEAT_ENABLED** = ``1``
- Texture will repeat normally.
- .. _class_VisualShaderNodeTextureParameter_constant_REPEAT_DISABLED:
- .. rst-class:: classref-enumeration-constant
- :ref:`TextureRepeat<enum_VisualShaderNodeTextureParameter_TextureRepeat>` **REPEAT_DISABLED** = ``2``
- Texture will not repeat.
- .. _class_VisualShaderNodeTextureParameter_constant_REPEAT_MAX:
- .. rst-class:: classref-enumeration-constant
- :ref:`TextureRepeat<enum_VisualShaderNodeTextureParameter_TextureRepeat>` **REPEAT_MAX** = ``3``
- Represents the size of the :ref:`TextureRepeat<enum_VisualShaderNodeTextureParameter_TextureRepeat>` enum.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_VisualShaderNodeTextureParameter_TextureSource:
- .. rst-class:: classref-enumeration
- enum **TextureSource**: :ref:`🔗<enum_VisualShaderNodeTextureParameter_TextureSource>`
- .. _class_VisualShaderNodeTextureParameter_constant_SOURCE_NONE:
- .. rst-class:: classref-enumeration-constant
- :ref:`TextureSource<enum_VisualShaderNodeTextureParameter_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<enum_VisualShaderNodeTextureParameter_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<enum_VisualShaderNodeTextureParameter_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<enum_VisualShaderNodeTextureParameter_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<enum_VisualShaderNodeTextureParameter_TextureSource>` **SOURCE_MAX** = ``4``
- Represents the size of the :ref:`TextureSource<enum_VisualShaderNodeTextureParameter_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<enum_VisualShaderNodeTextureParameter_ColorDefault>` **color_default** = ``0`` :ref:`🔗<class_VisualShaderNodeTextureParameter_property_color_default>`
- .. rst-class:: classref-property-setget
- - |void| **set_color_default**\ (\ value\: :ref:`ColorDefault<enum_VisualShaderNodeTextureParameter_ColorDefault>`\ )
- - :ref:`ColorDefault<enum_VisualShaderNodeTextureParameter_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<enum_VisualShaderNodeTextureParameter_TextureFilter>` **texture_filter** = ``0`` :ref:`🔗<class_VisualShaderNodeTextureParameter_property_texture_filter>`
- .. rst-class:: classref-property-setget
- - |void| **set_texture_filter**\ (\ value\: :ref:`TextureFilter<enum_VisualShaderNodeTextureParameter_TextureFilter>`\ )
- - :ref:`TextureFilter<enum_VisualShaderNodeTextureParameter_TextureFilter>` **get_texture_filter**\ (\ )
- Sets the texture filtering mode. See :ref:`TextureFilter<enum_VisualShaderNodeTextureParameter_TextureFilter>` for options.
- .. rst-class:: classref-item-separator
- ----
- .. _class_VisualShaderNodeTextureParameter_property_texture_repeat:
- .. rst-class:: classref-property
- :ref:`TextureRepeat<enum_VisualShaderNodeTextureParameter_TextureRepeat>` **texture_repeat** = ``0`` :ref:`🔗<class_VisualShaderNodeTextureParameter_property_texture_repeat>`
- .. rst-class:: classref-property-setget
- - |void| **set_texture_repeat**\ (\ value\: :ref:`TextureRepeat<enum_VisualShaderNodeTextureParameter_TextureRepeat>`\ )
- - :ref:`TextureRepeat<enum_VisualShaderNodeTextureParameter_TextureRepeat>` **get_texture_repeat**\ (\ )
- Sets the texture repeating mode. See :ref:`TextureRepeat<enum_VisualShaderNodeTextureParameter_TextureRepeat>` for options.
- .. rst-class:: classref-item-separator
- ----
- .. _class_VisualShaderNodeTextureParameter_property_texture_source:
- .. rst-class:: classref-property
- :ref:`TextureSource<enum_VisualShaderNodeTextureParameter_TextureSource>` **texture_source** = ``0`` :ref:`🔗<class_VisualShaderNodeTextureParameter_property_texture_source>`
- .. rst-class:: classref-property-setget
- - |void| **set_texture_source**\ (\ value\: :ref:`TextureSource<enum_VisualShaderNodeTextureParameter_TextureSource>`\ )
- - :ref:`TextureSource<enum_VisualShaderNodeTextureParameter_TextureSource>` **get_texture_source**\ (\ )
- Sets the texture source mode. Used for reading from the screen, depth, or normal_roughness texture. See :ref:`TextureSource<enum_VisualShaderNodeTextureParameter_TextureSource>` for options.
- .. rst-class:: classref-item-separator
- ----
- .. _class_VisualShaderNodeTextureParameter_property_texture_type:
- .. rst-class:: classref-property
- :ref:`TextureType<enum_VisualShaderNodeTextureParameter_TextureType>` **texture_type** = ``0`` :ref:`🔗<class_VisualShaderNodeTextureParameter_property_texture_type>`
- .. rst-class:: classref-property-setget
- - |void| **set_texture_type**\ (\ value\: :ref:`TextureType<enum_VisualShaderNodeTextureParameter_TextureType>`\ )
- - :ref:`TextureType<enum_VisualShaderNodeTextureParameter_TextureType>` **get_texture_type**\ (\ )
- Defines the type of data provided by the source texture. See :ref:`TextureType<enum_VisualShaderNodeTextureParameter_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.)`
|