virtualx-engine-docs/_sources/classes/class_visualshadernodetexture.rst.txt

197 lines
6.8 KiB
Text
Raw Normal View History

2024-10-23 18:41:33 +02:00
: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<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_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<enum_VisualShaderNodeTexture_Source>` | :ref:`source<class_VisualShaderNodeTexture_property_source>` | ``0`` |
+--------------------------------------------------------------+--------------------------------------------------------------------------+-------+
| :ref:`Texture<class_Texture>` | :ref:`texture<class_VisualShaderNodeTexture_property_texture>` | |
+--------------------------------------------------------------+--------------------------------------------------------------------------+-------+
| :ref:`TextureType<enum_VisualShaderNodeTexture_TextureType>` | :ref:`texture_type<class_VisualShaderNodeTexture_property_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<enum_VisualShaderNodeTexture_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<enum_VisualShaderNodeTexture_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<enum_VisualShaderNodeTexture_Source>` **SOURCE_2D_TEXTURE** = ``2``
Use the texture from this shader's texture built-in (e.g. a texture of a :ref:`Sprite<class_Sprite>`).
.. _class_VisualShaderNodeTexture_constant_SOURCE_2D_NORMAL:
.. rst-class:: classref-enumeration-constant
:ref:`Source<enum_VisualShaderNodeTexture_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<enum_VisualShaderNodeTexture_Source>` **SOURCE_DEPTH** = ``4``
Use the depth texture available for this shader.
.. _class_VisualShaderNodeTexture_constant_SOURCE_PORT:
.. rst-class:: classref-enumeration-constant
:ref:`Source<enum_VisualShaderNodeTexture_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<enum_VisualShaderNodeTexture_TextureType>` **TYPE_DATA** = ``0``
No hints are added to the uniform declaration.
.. _class_VisualShaderNodeTexture_constant_TYPE_COLOR:
.. rst-class:: classref-enumeration-constant
:ref:`TextureType<enum_VisualShaderNodeTexture_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<enum_VisualShaderNodeTexture_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<enum_VisualShaderNodeTexture_Source>` **source** = ``0``
.. rst-class:: classref-property-setget
- void **set_source** **(** :ref:`Source<enum_VisualShaderNodeTexture_Source>` value **)**
- :ref:`Source<enum_VisualShaderNodeTexture_Source>` **get_source** **(** **)**
Determines the source for the lookup. See :ref:`Source<enum_VisualShaderNodeTexture_Source>` for options.
.. rst-class:: classref-item-separator
----
.. _class_VisualShaderNodeTexture_property_texture:
.. rst-class:: classref-property
:ref:`Texture<class_Texture>` **texture**
.. rst-class:: classref-property-setget
- void **set_texture** **(** :ref:`Texture<class_Texture>` value **)**
- :ref:`Texture<class_Texture>` **get_texture** **(** **)**
The source texture, if needed for the selected :ref:`source<class_VisualShaderNodeTexture_property_source>`.
.. rst-class:: classref-item-separator
----
.. _class_VisualShaderNodeTexture_property_texture_type:
.. rst-class:: classref-property
:ref:`TextureType<enum_VisualShaderNodeTexture_TextureType>` **texture_type** = ``0``
.. rst-class:: classref-property-setget
- void **set_texture_type** **(** :ref:`TextureType<enum_VisualShaderNodeTexture_TextureType>` value **)**
- :ref:`TextureType<enum_VisualShaderNodeTexture_TextureType>` **get_texture_type** **(** **)**
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.
.. |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.)`