Function createTexture2DArray
-
createTexture2DArray(
engine: EngineContext,
width: number,
height: number,
layers: number,
options?: TextureArrayOptions,
): Texture2DArrayParameters
- engine: EngineContext
Engine context.
- width: number
Layer width in texels (>= 1).
- height: number
Layer height in texels (>= 1).
- layers: number
Number of array layers (>= 1).
- options: TextureArrayOptions = {}
Sampler / format overrides.
Returns Texture2DArray
- engine: EngineContext
Create an empty 2D texture array of
layerssame-size layers (RGBA8 unlessoptions.formatsays otherwise), ready to be filled withuploadImageToArrayLayer()/loadImageToArrayLayer().The texture is created with
TEXTURE_BINDING | COPY_DST | RENDER_ATTACHMENTusage —copyExternalImageToTexture(used by the upload helpers) requires bothCOPY_DSTandRENDER_ATTACHMENTon the destination, and the render attachment is also what the mipmap-blit pass writes into.