mirror of
https://github.com/Relintai/pandemonium_engine_docs.git
synced 2025-01-23 15:17:21 +01:00
132 lines
5.3 KiB
ReStructuredText
132 lines
5.3 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. DO NOT EDIT THIS FILE!!!
|
|
.. Generated automatically from Godot engine sources.
|
|
.. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py.
|
|
.. XML source: https://github.com/godotengine/godot/tree/3.5/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.
|
|
|
|
Description
|
|
-----------
|
|
|
|
Performs a lookup operation on the provided texture, with support for multiple texture sources to choose from.
|
|
|
|
Properties
|
|
----------
|
|
|
|
+--------------------------------------------------------------+--------------------------------------------------------------------------+-------+
|
|
| :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`` |
|
|
+--------------------------------------------------------------+--------------------------------------------------------------------------+-------+
|
|
|
|
Enumerations
|
|
------------
|
|
|
|
.. _enum_VisualShaderNodeTexture_Source:
|
|
|
|
.. _class_VisualShaderNodeTexture_constant_SOURCE_TEXTURE:
|
|
|
|
.. _class_VisualShaderNodeTexture_constant_SOURCE_SCREEN:
|
|
|
|
.. _class_VisualShaderNodeTexture_constant_SOURCE_2D_TEXTURE:
|
|
|
|
.. _class_VisualShaderNodeTexture_constant_SOURCE_2D_NORMAL:
|
|
|
|
.. _class_VisualShaderNodeTexture_constant_SOURCE_DEPTH:
|
|
|
|
.. _class_VisualShaderNodeTexture_constant_SOURCE_PORT:
|
|
|
|
enum **Source**:
|
|
|
|
- **SOURCE_TEXTURE** = **0** --- Use the texture given as an argument for this function.
|
|
|
|
- **SOURCE_SCREEN** = **1** --- Use the current viewport's texture as the 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>`).
|
|
|
|
- **SOURCE_2D_NORMAL** = **3** --- Use the texture from this shader's normal map built-in.
|
|
|
|
- **SOURCE_DEPTH** = **4** --- Use the depth texture available for this shader.
|
|
|
|
- **SOURCE_PORT** = **5** --- Use the texture provided in the input port for this function.
|
|
|
|
----
|
|
|
|
.. _enum_VisualShaderNodeTexture_TextureType:
|
|
|
|
.. _class_VisualShaderNodeTexture_constant_TYPE_DATA:
|
|
|
|
.. _class_VisualShaderNodeTexture_constant_TYPE_COLOR:
|
|
|
|
.. _class_VisualShaderNodeTexture_constant_TYPE_NORMALMAP:
|
|
|
|
enum **TextureType**:
|
|
|
|
- **TYPE_DATA** = **0** --- No hints are added to the uniform declaration.
|
|
|
|
- **TYPE_COLOR** = **1** --- Adds ``hint_albedo`` as hint to the uniform declaration for proper sRGB to linear conversion.
|
|
|
|
- **TYPE_NORMALMAP** = **2** --- Adds ``hint_normal`` as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
|
|
|
|
Property Descriptions
|
|
---------------------
|
|
|
|
.. _class_VisualShaderNodeTexture_property_source:
|
|
|
|
- :ref:`Source<enum_VisualShaderNodeTexture_Source>` **source**
|
|
|
|
+-----------+-------------------+
|
|
| *Default* | ``0`` |
|
|
+-----------+-------------------+
|
|
| *Setter* | set_source(value) |
|
|
+-----------+-------------------+
|
|
| *Getter* | get_source() |
|
|
+-----------+-------------------+
|
|
|
|
Determines the source for the lookup. See :ref:`Source<enum_VisualShaderNodeTexture_Source>` for options.
|
|
|
|
----
|
|
|
|
.. _class_VisualShaderNodeTexture_property_texture:
|
|
|
|
- :ref:`Texture<class_Texture>` **texture**
|
|
|
|
+----------+--------------------+
|
|
| *Setter* | set_texture(value) |
|
|
+----------+--------------------+
|
|
| *Getter* | get_texture() |
|
|
+----------+--------------------+
|
|
|
|
The source texture, if needed for the selected :ref:`source<class_VisualShaderNodeTexture_property_source>`.
|
|
|
|
----
|
|
|
|
.. _class_VisualShaderNodeTexture_property_texture_type:
|
|
|
|
- :ref:`TextureType<enum_VisualShaderNodeTexture_TextureType>` **texture_type**
|
|
|
|
+-----------+-------------------------+
|
|
| *Default* | ``0`` |
|
|
+-----------+-------------------------+
|
|
| *Setter* | set_texture_type(value) |
|
|
+-----------+-------------------------+
|
|
| *Getter* | 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.)`
|