ImageTexture3D

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

3维纹理。

描述

ImageTexture3D是一个具有宽度、高度和深度的3维ImageTexture。另请参阅ImageTextureLayered

3D纹理通常用于存储FogMaterial的密度贴图、Environment的颜色校准LUT、ParticleAspiratorVectorFieldGPU的矢量场和ParticleColliderSDFGPU的碰撞贴图。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]) 🔗

创建具有指定widthheightdepthImageTexture3D。有关format选项,请参阅Format。如果use_mipmapstrue,则为ImageTexture3D生成mipmap。


void update(data: Array[Image]) 🔗

data中指定的图层替换纹理的存量数据。data的大小必须与用于create()的参数匹配。换句话说,不能通过调用update()来调整纹理的大小或更改其格式。