Class reference

VisualShaderNodeTexture

Inherits VisualShaderNode

Performs a 2D texture lookup within the visual shader graph.

Description

Performs a lookup operation on the provided texture, with support for multiple texture sources to choose from.

Properties

int source = 0

Determines the source for the lookup.

Constants

SOURCE_TEXTURE = 0

Enum: Source

Use the texture given as an argument for this function.

SOURCE_SCREEN = 1

Enum: Source

Use the current viewport's texture as the source.

SOURCE_2D_TEXTURE = 2

Enum: Source

Use the texture from this shader's texture built-in (e.g. a texture of a Sprite2D).

SOURCE_2D_NORMAL = 3

Enum: Source

Use the texture from this shader's normal map built-in.

SOURCE_DEPTH = 4

Enum: Source

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

Enum: Source

Use the texture provided in the input port for this function.

SOURCE_3D_NORMAL = 6

Enum: Source

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

Enum: Source

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

Enum: Source

Represents the size of the Source enum.

TYPE_DATA = 0

Enum: TextureType

No hints are added to the uniform declaration.

TYPE_COLOR = 1

Enum: TextureType

Adds source_color as hint to the uniform declaration for proper sRGB to linear conversion.

TYPE_NORMAL_MAP = 2

Enum: TextureType

Adds hint_normal as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.

TYPE_MAX = 3

Enum: TextureType

Represents the size of the TextureType enum.

Source revision 4f5b14abade2
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.