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.

VisualShaderNodeCubemap

繼承: VisualShaderNode < Resource < RefCounted < Object

在視覺化著色器圖中使用的一種 Cubemap 取樣節點。

說明

在著色器語言中被轉換成 texture(cubemap, vec3)。返回一個顏色向量和 Alpha 通道的標量。

屬性

TextureLayered

cube_map

Source

source

0

TextureType

texture_type

0


列舉

enum Source: 🔗

Source SOURCE_TEXTURE = 0

使用 cube_map 設定的 Cubemap。如果設定為 source,則會忽略 samplerCube 埠。

Source SOURCE_PORT = 1

使用通過 samplerCube 埠傳遞的 Cubemap 取樣器引用。如果設定為 source,則會忽略 cube_map 紋理。

Source SOURCE_MAX = 2

代表 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 列舉的大小。


屬性說明

TextureLayered cube_map 🔗

當使用 SOURCE_TEXTURE 作為 source 時,要取樣的 Cubemap 紋理。


Source source = 0 🔗

Defines which source should be used for the sampling.


TextureType texture_type = 0 🔗

Defines the type of data provided by the source texture.