2018-07-26 11:56:21 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-07-06 10:08:05 +02:00
<class name= "VisualShaderNodeTextureParameter" inherits= "VisualShaderNodeParameter" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2018-07-26 11:56:21 +02:00
<brief_description >
2020-05-07 11:19:23 +02:00
Performs a uniform 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 texture provided as a uniform for the shader.
2018-07-26 11:56:21 +02:00
</description>
<tutorials >
</tutorials>
<members >
2022-08-27 11:22:43 +02:00
<member name= "color_default" type= "int" setter= "set_color_default" getter= "get_color_default" enum= "VisualShaderNodeTextureParameter.ColorDefault" default= "0" >
2020-05-07 11:19:23 +02:00
Sets the default color if no texture is assigned to the uniform.
2018-07-26 11:56:21 +02:00
</member>
2022-08-27 11:22:43 +02:00
<member name= "texture_filter" type= "int" setter= "set_texture_filter" getter= "get_texture_filter" enum= "VisualShaderNodeTextureParameter.TextureFilter" default= "0" >
2021-12-16 09:41:29 +01:00
Sets the texture filtering mode. See [enum TextureFilter] for options.
</member>
2022-08-27 11:22:43 +02:00
<member name= "texture_repeat" type= "int" setter= "set_texture_repeat" getter= "get_texture_repeat" enum= "VisualShaderNodeTextureParameter.TextureRepeat" default= "0" >
2021-12-16 09:41:29 +01:00
Sets the texture repeating mode. See [enum TextureRepeat] for options.
</member>
2023-01-05 20:55:59 +01:00
<member name= "texture_source" type= "int" setter= "set_texture_source" getter= "get_texture_source" enum= "VisualShaderNodeTextureParameter.TextureSource" default= "0" >
2023-04-18 13:53:47 +02:00
Sets the texture source mode. Used for reading from the screen, depth, or normal_roughness texture. See [enum TextureSource] for options.
2023-01-05 20:55:59 +01:00
</member>
2022-08-27 11:22:43 +02:00
<member name= "texture_type" type= "int" setter= "set_texture_type" getter= "get_texture_type" enum= "VisualShaderNodeTextureParameter.TextureType" default= "0" >
2020-05-07 11:19:23 +02:00
Defines the type of data provided by the source texture. See [enum TextureType] for options.
2018-07-26 11:56:21 +02:00
</member>
</members>
<constants >
<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" >
2022-05-05 20:23:40 +02:00
Adds [code]source_color[/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-12-09 20:29:06 +01:00
<constant name= "TYPE_ANISOTROPY" value= "3" enum= "TextureType" >
Adds [code]hint_anisotropy[/code] as hint to the uniform declaration to use for a flowmap.
2018-07-26 11:56:21 +02:00
</constant>
2021-08-14 12:38:22 +02:00
<constant name= "TYPE_MAX" value= "4" enum= "TextureType" >
Represents the size of the [enum TextureType] enum.
</constant>
2018-07-26 11:56:21 +02:00
<constant name= "COLOR_DEFAULT_WHITE" value= "0" enum= "ColorDefault" >
2021-08-14 18:29:52 +02:00
Defaults to fully opaque white color.
2018-07-26 11:56:21 +02:00
</constant>
<constant name= "COLOR_DEFAULT_BLACK" value= "1" enum= "ColorDefault" >
2021-08-14 18:29:52 +02:00
Defaults to fully opaque black color.
2018-07-26 11:56:21 +02:00
</constant>
2021-08-14 18:29:52 +02:00
<constant name= "COLOR_DEFAULT_TRANSPARENT" value= "2" enum= "ColorDefault" >
Defaults to fully transparent black color.
</constant>
<constant name= "COLOR_DEFAULT_MAX" value= "3" enum= "ColorDefault" >
2021-08-14 12:38:22 +02:00
Represents the size of the [enum ColorDefault] enum.
</constant>
2021-12-16 09:41:29 +01:00
<constant name= "FILTER_DEFAULT" value= "0" enum= "TextureFilter" >
2022-12-07 15:59:34 +01:00
Sample the texture using the filter determined by the node this shader is attached to.
2021-12-16 09:41:29 +01:00
</constant>
<constant name= "FILTER_NEAREST" value= "1" enum= "TextureFilter" >
2022-12-07 15:59:34 +01:00
The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized.
2021-12-16 09:41:29 +01:00
</constant>
<constant name= "FILTER_LINEAR" value= "2" enum= "TextureFilter" >
2022-12-07 15:59:34 +01:00
The texture filter blends between the nearest four pixels. Use this for most cases where you want to avoid a pixelated style.
2021-12-16 09:41:29 +01:00
</constant>
<constant name= "FILTER_NEAREST_MIPMAP" value= "3" enum= "TextureFilter" >
2022-12-07 15:59:34 +01:00
The texture filter reads from the nearest pixel in the nearest mipmap. This is the fastest way to read from textures with mipmaps.
2021-12-16 09:41:29 +01:00
</constant>
<constant name= "FILTER_LINEAR_MIPMAP" value= "4" enum= "TextureFilter" >
2022-12-07 15:59:34 +01:00
The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.
2021-12-16 09:41:29 +01:00
</constant>
<constant name= "FILTER_NEAREST_MIPMAP_ANISOTROPIC" value= "5" enum= "TextureFilter" >
2022-12-07 15:59:34 +01:00
The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
[b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant FILTER_LINEAR_MIPMAP] is usually more appropriate.
2021-12-16 09:41:29 +01:00
</constant>
<constant name= "FILTER_LINEAR_MIPMAP_ANISOTROPIC" value= "6" enum= "TextureFilter" >
2022-12-07 15:59:34 +01:00
The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
[b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant FILTER_LINEAR_MIPMAP] is usually more appropriate.
2021-12-16 09:41:29 +01:00
</constant>
<constant name= "FILTER_MAX" value= "7" enum= "TextureFilter" >
Represents the size of the [enum TextureFilter] enum.
</constant>
<constant name= "REPEAT_DEFAULT" value= "0" enum= "TextureRepeat" >
2022-12-07 15:59:34 +01:00
Sample the texture using the repeat mode determined by the node this shader is attached to.
2021-12-16 09:41:29 +01:00
</constant>
<constant name= "REPEAT_ENABLED" value= "1" enum= "TextureRepeat" >
2022-12-07 15:59:34 +01:00
Texture will repeat normally.
2021-12-16 09:41:29 +01:00
</constant>
<constant name= "REPEAT_DISABLED" value= "2" enum= "TextureRepeat" >
2022-12-07 15:59:34 +01:00
Texture will not repeat.
2021-12-16 09:41:29 +01:00
</constant>
<constant name= "REPEAT_MAX" value= "3" enum= "TextureRepeat" >
Represents the size of the [enum TextureRepeat] enum.
</constant>
2023-01-05 20:55:59 +01:00
<constant name= "SOURCE_NONE" value= "0" enum= "TextureSource" >
The texture source is not specified in the shader.
</constant>
<constant name= "SOURCE_SCREEN" value= "1" enum= "TextureSource" >
The texture source is the screen texture which captures all opaque objects drawn this frame.
</constant>
<constant name= "SOURCE_DEPTH" value= "2" enum= "TextureSource" >
The texture source is the depth texture from the depth prepass.
</constant>
<constant name= "SOURCE_NORMAL_ROUGHNESS" value= "3" enum= "TextureSource" >
The texture source is the normal-roughness buffer from the depth prepass.
</constant>
<constant name= "SOURCE_MAX" value= "4" enum= "TextureSource" >
Represents the size of the [enum TextureSource] enum.
</constant>
2018-07-26 11:56:21 +02:00
</constants>
</class>