0.2.0-dev Download ZIP
112 lines ·8.0 KB Raw
| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="VisualShaderNodeTextureParameter" inherits="VisualShaderNodeParameter" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> |
| 3 | <brief_description> |
| 4 | Performs a uniform texture lookup within the visual shader graph. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | Performs a lookup operation on the texture provided as a uniform for the shader. |
| 8 | </description> |
| 9 | <tutorials> |
| 10 | </tutorials> |
| 11 | <members> |
| 12 | <member name="color_default" type="int" setter="set_color_default" getter="get_color_default" enum="VisualShaderNodeTextureParameter.ColorDefault" default="0"> |
| 13 | Sets the default color if no texture is assigned to the uniform. |
| 14 | </member> |
| 15 | <member name="texture_filter" type="int" setter="set_texture_filter" getter="get_texture_filter" enum="VisualShaderNodeTextureParameter.TextureFilter" default="0"> |
| 16 | Sets the texture filtering mode. |
| 17 | </member> |
| 18 | <member name="texture_repeat" type="int" setter="set_texture_repeat" getter="get_texture_repeat" enum="VisualShaderNodeTextureParameter.TextureRepeat" default="0"> |
| 19 | Sets the texture repeating mode. |
| 20 | </member> |
| 21 | <member name="texture_source" type="int" setter="set_texture_source" getter="get_texture_source" enum="VisualShaderNodeTextureParameter.TextureSource" default="0"> |
| 22 | Sets the texture source mode. Used for reading from the screen, depth, or normal_roughness texture. |
| 23 | </member> |
| 24 | <member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeTextureParameter.TextureType" default="0"> |
| 25 | Defines the type of data provided by the source texture. |
| 26 | </member> |
| 27 | </members> |
| 28 | <constants> |
| 29 | <constant name="TYPE_DATA" value="0" enum="TextureType"> |
| 30 | No hints are added to the uniform declaration. |
| 31 | </constant> |
| 32 | <constant name="TYPE_COLOR" value="1" enum="TextureType"> |
| 33 | Adds [code]source_color[/code] as hint to the uniform declaration for proper conversion from nonlinear sRGB encoding to linear encoding. |
| 34 | </constant> |
| 35 | <constant name="TYPE_NORMAL_MAP" value="2" enum="TextureType"> |
| 36 | Adds [code]hint_normal[/code] as hint to the uniform declaration, which internally converts the texture for proper usage as normal map. |
| 37 | </constant> |
| 38 | <constant name="TYPE_ANISOTROPY" value="3" enum="TextureType"> |
| 39 | Adds [code]hint_anisotropy[/code] as hint to the uniform declaration to use for a flowmap. |
| 40 | </constant> |
| 41 | <constant name="TYPE_MAX" value="4" enum="TextureType"> |
| 42 | Represents the size of the [enum TextureType] enum. |
| 43 | </constant> |
| 44 | <constant name="COLOR_DEFAULT_WHITE" value="0" enum="ColorDefault"> |
| 45 | Defaults to fully opaque white color. |
| 46 | </constant> |
| 47 | <constant name="COLOR_DEFAULT_BLACK" value="1" enum="ColorDefault"> |
| 48 | Defaults to fully opaque black color. |
| 49 | </constant> |
| 50 | <constant name="COLOR_DEFAULT_TRANSPARENT" value="2" enum="ColorDefault"> |
| 51 | Defaults to fully transparent black color. |
| 52 | </constant> |
| 53 | <constant name="COLOR_DEFAULT_MAX" value="3" enum="ColorDefault"> |
| 54 | Represents the size of the [enum ColorDefault] enum. |
| 55 | </constant> |
| 56 | <constant name="FILTER_DEFAULT" value="0" enum="TextureFilter"> |
| 57 | Sample the texture using the filter determined by the node this shader is attached to. |
| 58 | </constant> |
| 59 | <constant name="FILTER_NEAREST" value="1" enum="TextureFilter"> |
| 60 | 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). |
| 61 | </constant> |
| 62 | <constant name="FILTER_LINEAR" value="2" enum="TextureFilter"> |
| 63 | 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). |
| 64 | </constant> |
| 65 | <constant name="FILTER_NEAREST_MIPMAP" value="3" enum="TextureFilter"> |
| 66 | The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is [code]true[/code]). This makes the texture look pixelated from up close, and smooth from a distance. |
| 67 | Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. |
| 68 | </constant> |
| 69 | <constant name="FILTER_LINEAR_MIPMAP" value="4" enum="TextureFilter"> |
| 70 | The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is [code]true[/code]). This makes the texture look smooth from up close, and smooth from a distance. |
| 71 | Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. |
| 72 | </constant> |
| 73 | <constant name="FILTER_NEAREST_MIPMAP_ANISOTROPIC" value="5" enum="TextureFilter"> |
| 74 | The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is [code]true[/code]) 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 [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. |
| 75 | [b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant FILTER_NEAREST_MIPMAP] is usually more appropriate in this case. |
| 76 | </constant> |
| 77 | <constant name="FILTER_LINEAR_MIPMAP_ANISOTROPIC" value="6" enum="TextureFilter"> |
| 78 | The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is [code]true[/code]) 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 [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. |
| 79 | [b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant FILTER_LINEAR_MIPMAP] is usually more appropriate in this case. |
| 80 | </constant> |
| 81 | <constant name="FILTER_MAX" value="7" enum="TextureFilter"> |
| 82 | Represents the size of the [enum TextureFilter] enum. |
| 83 | </constant> |
| 84 | <constant name="REPEAT_DEFAULT" value="0" enum="TextureRepeat"> |
| 85 | Sample the texture using the repeat mode determined by the node this shader is attached to. |
| 86 | </constant> |
| 87 | <constant name="REPEAT_ENABLED" value="1" enum="TextureRepeat"> |
| 88 | Texture will repeat normally. |
| 89 | </constant> |
| 90 | <constant name="REPEAT_DISABLED" value="2" enum="TextureRepeat"> |
| 91 | Texture will not repeat. |
| 92 | </constant> |
| 93 | <constant name="REPEAT_MAX" value="3" enum="TextureRepeat"> |
| 94 | Represents the size of the [enum TextureRepeat] enum. |
| 95 | </constant> |
| 96 | <constant name="SOURCE_NONE" value="0" enum="TextureSource"> |
| 97 | The texture source is not specified in the shader. |
| 98 | </constant> |
| 99 | <constant name="SOURCE_SCREEN" value="1" enum="TextureSource"> |
| 100 | The texture source is the screen texture which captures all opaque objects drawn this frame. |
| 101 | </constant> |
| 102 | <constant name="SOURCE_DEPTH" value="2" enum="TextureSource"> |
| 103 | The texture source is the depth texture from the depth prepass. |
| 104 | </constant> |
| 105 | <constant name="SOURCE_NORMAL_ROUGHNESS" value="3" enum="TextureSource"> |
| 106 | The texture source is the normal-roughness buffer from the depth prepass. |
| 107 | </constant> |
| 108 | <constant name="SOURCE_MAX" value="4" enum="TextureSource"> |
| 109 | Represents the size of the [enum TextureSource] enum. |
| 110 | </constant> |
| 111 | </constants> |
| 112 | </class> |