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...
ImageTexture3D
继承: Texture3D < Texture < Resource < RefCounted < Object
具有 3 个维度的纹理。
描述
ImageTexture3D 是一种具有宽度、高度和深度的三维 ImageTexture。另见 ImageTextureLayered。
3D 纹理通常用于存储 FogMaterial 的密度图、Environment 的色彩校正 LUT、GPUParticlesAttractorVectorField3D 的矢量场和 GPUParticlesCollisionSDF3D 的碰撞图。3D 纹理也可用于自定义着色器。
方法
create(format: Format, width: int, height: int, depth: int, use_mipmaps: bool, data: Array[Image]) |
|
void |
方法说明
Error create(format: Format, width: int, height: int, depth: int, use_mipmaps: bool, data: Array[Image]) 🔗
创建具有指定 width
、height
和 depth
的 ImageTexture3D。请参阅 Format 了解 format
选项。如果 use_mipmaps
为 true
,则为该 ImageTexture3D 生成 Mipmaps。
void update(data: Array[Image]) 🔗
将纹理的现有数据替换为 data
中指定的图层。data
的大小必须与用于 create() 的参数一致。换句话说,不能通过调用 update() 来调整纹理的大小或改变其格式。