Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
VisualShaderNodeTexture
繼承: VisualShaderNode < Resource < RefCounted < Object
在視覺化著色器圖中,執行 2D 紋理搜尋。
說明
對提供的紋理進行搜尋操作,支援從多個紋理源選擇。
屬性
|
||
|
列舉
enum Source: 🔗
Source SOURCE_TEXTURE = 0
使用給定的紋理作為此函式的參數。
Source SOURCE_SCREEN = 1
使用目前視口的紋理作為源。
Source SOURCE_2D_TEXTURE = 2
使用該著色器內建紋理中的紋理(例如 Sprite2D 的紋理)。
Source SOURCE_2D_NORMAL = 3
使用該著色器內建的法線貼圖的紋理。
Source SOURCE_DEPTH = 4
使用在深度預處理過程中捕獲的深度紋理。只有在使用深度預處理時才可用(即在空間著色器和 forward_plus 或 gl_compatibility 算繪器中)。
Source SOURCE_PORT = 5
將輸入埠中提供的紋理用於此函式。
Source SOURCE_3D_NORMAL = 6
使用在深度預處理過程中捕獲的法線緩衝區。只有在法線粗糙度緩衝區可用時才可用(即在空間著色器和 forward_plus 算繪器中)。
Source SOURCE_ROUGHNESS = 7
使用在深度預處理過程中捕獲的粗糙度緩衝區。僅當法線粗糙度緩衝區可用時才可用(即在空間著色器和 forward_plus 算繪器中)。
Source SOURCE_MAX = 8
代表 Source 列舉的大小。
enum TextureType: 🔗
TextureType TYPE_DATA = 0
在uniform宣告中未新增提示。
TextureType TYPE_COLOR = 1
Adds source_color as hint to the uniform declaration for proper conversion from nonlinear sRGB encoding to linear encoding.
TextureType TYPE_NORMAL_MAP = 2
將 hint_normal 作為提示新增到 uniform 宣告中,該宣告在內部將紋理轉換為法線貼圖。
TextureType TYPE_MAX = 3
代表 TextureType 列舉的大小。
屬性說明
Determines the source for the lookup.
源紋理,如果需要的話,用於選定的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.