2018-07-26 11:56:21 +02:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
2022-02-14 14:18:53 +01:00
|
|
|
<class name="VisualShaderNodeTexture" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
2018-07-26 11:56:21 +02:00
|
|
|
<brief_description>
|
2020-09-10 05:47:09 +02:00
|
|
|
Performs a 2D texture lookup within the visual shader graph.
|
2018-07-26 11:56:21 +02:00
|
|
|
</brief_description>
|
|
|
|
<description>
|
2020-05-07 11:19:23 +02:00
|
|
|
Performs a lookup operation on the provided texture, with support for multiple texture sources to choose from.
|
2018-07-26 11:56:21 +02:00
|
|
|
</description>
|
|
|
|
<tutorials>
|
|
|
|
</tutorials>
|
|
|
|
<members>
|
2019-06-29 12:38:01 +02:00
|
|
|
<member name="source" type="int" setter="set_source" getter="get_source" enum="VisualShaderNodeTexture.Source" default="0">
|
2020-05-07 11:19:23 +02:00
|
|
|
Determines the source for the lookup. See [enum Source] for options.
|
2018-07-26 11:56:21 +02:00
|
|
|
</member>
|
2020-02-12 09:59:06 +01:00
|
|
|
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
|
2020-05-07 11:19:23 +02:00
|
|
|
The source texture, if needed for the selected [member source].
|
2018-07-26 11:56:21 +02:00
|
|
|
</member>
|
2019-06-29 12:38:01 +02:00
|
|
|
<member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeTexture.TextureType" default="0">
|
2020-05-07 11:19:23 +02:00
|
|
|
Specifies the type of the texture if [member source] is set to [constant SOURCE_TEXTURE]. See [enum TextureType] for options.
|
2018-07-26 11:56:21 +02:00
|
|
|
</member>
|
|
|
|
</members>
|
|
|
|
<constants>
|
|
|
|
<constant name="SOURCE_TEXTURE" value="0" enum="Source">
|
2020-05-07 11:19:23 +02:00
|
|
|
Use the texture given as an argument for this function.
|
2018-07-26 11:56:21 +02:00
|
|
|
</constant>
|
|
|
|
<constant name="SOURCE_SCREEN" value="1" enum="Source">
|
2020-05-07 11:19:23 +02:00
|
|
|
Use the current viewport's texture as the source.
|
2018-07-26 11:56:21 +02:00
|
|
|
</constant>
|
|
|
|
<constant name="SOURCE_2D_TEXTURE" value="2" enum="Source">
|
2020-05-07 11:19:23 +02:00
|
|
|
Use the texture from this shader's texture built-in (e.g. a texture of a [Sprite2D]).
|
2018-07-26 11:56:21 +02:00
|
|
|
</constant>
|
|
|
|
<constant name="SOURCE_2D_NORMAL" value="3" enum="Source">
|
2020-05-07 11:19:23 +02:00
|
|
|
Use the texture from this shader's normal map built-in.
|
2018-07-26 11:56:21 +02:00
|
|
|
</constant>
|
2019-07-05 10:48:31 +02:00
|
|
|
<constant name="SOURCE_DEPTH" value="4" enum="Source">
|
2020-05-07 11:19:23 +02:00
|
|
|
Use the depth texture available for this shader.
|
2019-07-05 10:48:31 +02:00
|
|
|
</constant>
|
2019-12-13 10:37:59 +01:00
|
|
|
<constant name="SOURCE_PORT" value="5" enum="Source">
|
2020-05-07 11:19:23 +02:00
|
|
|
Use the texture provided in the input port for this function.
|
2019-12-13 10:37:59 +01:00
|
|
|
</constant>
|
2021-08-14 12:38:22 +02:00
|
|
|
<constant name="SOURCE_MAX" value="6" enum="Source">
|
|
|
|
Represents the size of the [enum Source] enum.
|
|
|
|
</constant>
|
2018-07-26 11:56:21 +02:00
|
|
|
<constant name="TYPE_DATA" value="0" enum="TextureType">
|
2020-05-07 11:19:23 +02:00
|
|
|
No hints are added to the uniform declaration.
|
2018-07-26 11:56:21 +02:00
|
|
|
</constant>
|
|
|
|
<constant name="TYPE_COLOR" value="1" enum="TextureType">
|
2020-05-07 11:19:23 +02:00
|
|
|
Adds [code]hint_albedo[/code] as hint to the uniform declaration for proper sRGB to linear conversion.
|
2018-07-26 11:56:21 +02:00
|
|
|
</constant>
|
2020-12-23 10:34:26 +01:00
|
|
|
<constant name="TYPE_NORMAL_MAP" value="2" enum="TextureType">
|
2020-05-07 11:19:23 +02:00
|
|
|
Adds [code]hint_normal[/code] as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
|
2018-07-26 11:56:21 +02:00
|
|
|
</constant>
|
2021-08-14 12:38:22 +02:00
|
|
|
<constant name="TYPE_MAX" value="3" enum="TextureType">
|
|
|
|
Represents the size of the [enum TextureType] enum.
|
|
|
|
</constant>
|
2018-07-26 11:56:21 +02:00
|
|
|
</constants>
|
|
|
|
</class>
|