0.2.0-dev Download ZIP
63 lines ·3.3 KB Raw
| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="VisualShaderNodeTexture" inherits="VisualShaderNode" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> |
| 3 | <brief_description> |
| 4 | Performs a 2D texture lookup within the visual shader graph. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | Performs a lookup operation on the provided texture, with support for multiple texture sources to choose from. |
| 8 | </description> |
| 9 | <tutorials> |
| 10 | </tutorials> |
| 11 | <members> |
| 12 | <member name="source" type="int" setter="set_source" getter="get_source" enum="VisualShaderNodeTexture.Source" default="0"> |
| 13 | Determines the source for the lookup. |
| 14 | </member> |
| 15 | <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> |
| 16 | The source texture, if needed for the selected [member source]. |
| 17 | </member> |
| 18 | <member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeTexture.TextureType" default="0"> |
| 19 | Specifies the type of the texture if [member source] is set to [constant SOURCE_TEXTURE]. |
| 20 | </member> |
| 21 | </members> |
| 22 | <constants> |
| 23 | <constant name="SOURCE_TEXTURE" value="0" enum="Source"> |
| 24 | Use the texture given as an argument for this function. |
| 25 | </constant> |
| 26 | <constant name="SOURCE_SCREEN" value="1" enum="Source"> |
| 27 | Use the current viewport's texture as the source. |
| 28 | </constant> |
| 29 | <constant name="SOURCE_2D_TEXTURE" value="2" enum="Source"> |
| 30 | Use the texture from this shader's texture built-in (e.g. a texture of a [Sprite2D]). |
| 31 | </constant> |
| 32 | <constant name="SOURCE_2D_NORMAL" value="3" enum="Source"> |
| 33 | Use the texture from this shader's normal map built-in. |
| 34 | </constant> |
| 35 | <constant name="SOURCE_DEPTH" value="4" enum="Source"> |
| 36 | Use the depth texture captured during the depth prepass. Only available when the depth prepass is used (i.e. in spatial shaders and in the forward_plus or gl_compatibility renderers). |
| 37 | </constant> |
| 38 | <constant name="SOURCE_PORT" value="5" enum="Source"> |
| 39 | Use the texture provided in the input port for this function. |
| 40 | </constant> |
| 41 | <constant name="SOURCE_3D_NORMAL" value="6" enum="Source"> |
| 42 | Use the normal buffer captured during the depth prepass. Only available when the normal-roughness buffer is available (i.e. in spatial shaders and in the forward_plus renderer). |
| 43 | </constant> |
| 44 | <constant name="SOURCE_ROUGHNESS" value="7" enum="Source"> |
| 45 | Use the roughness buffer captured during the depth prepass. Only available when the normal-roughness buffer is available (i.e. in spatial shaders and in the forward_plus renderer). |
| 46 | </constant> |
| 47 | <constant name="SOURCE_MAX" value="8" enum="Source"> |
| 48 | Represents the size of the [enum Source] enum. |
| 49 | </constant> |
| 50 | <constant name="TYPE_DATA" value="0" enum="TextureType"> |
| 51 | No hints are added to the uniform declaration. |
| 52 | </constant> |
| 53 | <constant name="TYPE_COLOR" value="1" enum="TextureType"> |
| 54 | Adds [code]source_color[/code] as hint to the uniform declaration for proper conversion from nonlinear sRGB encoding to linear encoding. |
| 55 | </constant> |
| 56 | <constant name="TYPE_NORMAL_MAP" value="2" enum="TextureType"> |
| 57 | Adds [code]hint_normal[/code] as hint to the uniform declaration, which internally converts the texture for proper usage as normal map. |
| 58 | </constant> |
| 59 | <constant name="TYPE_MAX" value="3" enum="TextureType"> |
| 60 | Represents the size of the [enum TextureType] enum. |
| 61 | </constant> |
| 62 | </constants> |
| 63 | </class> |