VisualShaderNodeTexture
继承: VisualShaderNode
< Resource
< RefCounted
< Object
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.
属性
枚举
enum Source:
Source SOURCE_TEXTURE = 0
Use the texture given as an argument for this function.
Source SOURCE_SCREEN = 1
Use the current viewport's texture as the source.
Source SOURCE_2D_TEXTURE = 2
Use the texture from this shader's texture built-in (e.g. a texture of a Sprite2D
).
Source SOURCE_2D_NORMAL = 3
Use the texture from this shader's normal map built-in.
Source 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 SOURCE_PORT = 5
Use the texture provided in the input port for this function.
Source 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 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 SOURCE_MAX = 8
Represents the size of the Source enum.
enum TextureType:
TextureType TYPE_DATA = 0
No hints are added to the uniform declaration.
TextureType TYPE_COLOR = 1
Adds source_color
as hint to the uniform declaration for proper sRGB to linear conversion.
TextureType TYPE_NORMAL_MAP = 2
Adds hint_normal
as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
TextureType TYPE_MAX = 3
Represents the size of the TextureType enum.
属性说明
Source source = 0
Determines the source for the lookup. See Source for options.
Texture2D
texture
The source texture, if needed for the selected source
.
TextureType texture_type = 0
void
set_texture_type ( value: TextureType )- TextureType get_texture_type ( )
Specifies the type of the texture if source
is set to SOURCE_TEXTURE
. See TextureType for options.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。