Engine API Reference - v2.24.0-beta.16
    Preparing search index...

    Class TextureView

    A TextureView specifies a texture and a subset of its mip levels and array layers. It is used when binding a texture to a compute shader or to a material, to specify which portion of the texture is accessed. Create a TextureView using Texture#getView.

    A shader indexes the mip levels and array layers of a view relative to the view - array layer 0 of a view is its first layer, baseArrayLayer. A view also allows a texture to be sampled in the same render pass that renders into a different layer or mip level of the texture, which is not possible when the whole texture is bound.

    Note: TextureView is only supported on WebGPU. On WebGL, the full texture is always bound, including all its mip levels and array layers.

    Index
    arrayLayerCount: number

    The number of array layers accessible to the view.

    baseArrayLayer: number

    The first array layer accessible to the view.

    baseMipLevel: number

    The first mip level accessible to the view.

    mipLevelCount: number

    The number of mip levels accessible to the view.

    texture: Texture

    The texture this view references.