VisualShaderNodeTexture
Inherits: VisualShaderNode < Resource < RefCounted < Object
Description
Section titled “Description”Performs a 2D texture lookup within the visual shader graph.
Performs a lookup operation on the provided texture, with support for multiple texture sources to choose from.
Properties
Section titled “Properties”| Type | Name | Default |
|---|---|---|
| Source | source |
0 |
| Texture2D | texture |
|
| TextureType | texture_type |
0 |
Enumerations
Section titled “Enumerations”Source
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 Sprite2D).
SOURCE_2D_NORMAL = 3
Use the texture from this shader’s normal map built-in.
SOURCE_DEPTH = 4
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).
SOURCE_PORT = 5
Use the texture provided in the input port for this function.
SOURCE_3D_NORMAL = 6
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).
SOURCE_ROUGHNESS = 7
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).
SOURCE_MAX = 8
Represents the size of the Source enum.
TextureType
enum TextureType
TYPE_DATA = 0
No hints are added to the uniform declaration.
TYPE_COLOR = 1
Adds source_color as hint to the uniform declaration for proper conversion from nonlinear sRGB encoding to linear encoding.
TYPE_NORMAL_MAP = 2
Adds hint_normal as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
TYPE_MAX = 3
Represents the size of the TextureType enum.
Property descriptions
Section titled “Property descriptions”source
Source source = 0
Determines the source for the lookup.
texture
Texture2D texture
The source texture, if needed for the selected source.
texture_type
TextureType texture_type = 0
Specifies the type of the texture if source is set to SOURCE_TEXTURE.
