Up to date
This page is up to date for Godot
If you still find outdated information, please open an issue.
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.
Source SOURCE_TEXTURE =
Use the texture given as an argument for this function.
Source SOURCE_SCREEN =
Use the current viewport's texture as the source.
Source SOURCE_2D_TEXTURE =
Use the texture from this shader's texture built-in (e.g. a texture of a Sprite2D).
Source SOURCE_2D_NORMAL =
Use the texture from this shader's normal map built-in.
Source SOURCE_DEPTH =
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 SOURCE_PORT =
Use the texture provided in the input port for this function.
Source SOURCE_3D_NORMAL =
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 SOURCE_ROUGHNESS =
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 SOURCE_MAX =
Represents the size of the Source enum.
TextureType TYPE_DATA =
No hints are added to the uniform declaration.
TextureType TYPE_COLOR =
hint_albedo as hint to the uniform declaration for proper sRGB to linear conversion.
TextureType TYPE_NORMAL_MAP =
hint_normal as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
TextureType TYPE_MAX =
Represents the size of the TextureType enum.
Source source =
Determines the source for the lookup. See Source for options.
The source texture, if needed for the selected source.
TextureType texture_type =