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.

ImageTexture3D

繼承: Texture3D < Texture < Resource < RefCounted < Object

具有 3 個維度的紋理。

說明

ImageTexture3D 是一種具有寬度、高度、和深度的三維 ImageTexture。另請參閱 ImageTextureLayered

3D 紋理通常用於儲存 FogMaterial 的密度圖、Environment 的色彩校正 LUT、GPUParticlesAttractorVectorField3D 的向量場、和 GPUParticlesCollisionSDF3D 的碰撞圖。3D 紋理也可用於自訂著色器。

方法

Error

create(format: Format, width: int, height: int, depth: int, use_mipmaps: bool, data: Array[Image])

void

update(data: Array[Image])


方法說明

Error create(format: Format, width: int, height: int, depth: int, use_mipmaps: bool, data: Array[Image]) 🔗

Creates the ImageTexture3D with specified format, width, height, and depth. If use_mipmaps is true, generates mipmaps for the ImageTexture3D.


void update(data: Array[Image]) 🔗

將紋理的現有資料替換為 data 中指定的圖層。data 的大小必須與用於 create() 的參數一致。換句話說,不能通過呼叫 update() 來調整紋理的大小或改變其格式。