@feng3d/render-api - v0.0.13
    Preparing search index...

    Interface TextureDescriptor

    纹理描述。

    interface TextureDescriptor {
        dimension?: TextureDimension;
        format?: TextureFormat;
        generateMipmap?: boolean;
        label?: string;
        mipLevelCount?: number;
        sampleCount?: 4;
        size: TextureSize;
    }
    Index

    Properties

    dimension?: TextureDimension

    纹理维度,默认为 "2d" 。

    WebGL中不支持 "1d" "cube-array"。

    注:修改后将重新创建纹理。

    format?: TextureFormat

    纹理格式。 默认为 "rgba8unorm",

    注:修改后将重新创建纹理。

    generateMipmap?: boolean

    是否生成mipmap

    仅在纹理创建时执行。

    注:修改后将重新创建纹理。

    label?: string

    标签。

    用于调试。

    注:修改后将重新创建纹理。

    mipLevelCount?: number

    The number of mip levels the texture will contain.

    注:修改后将重新创建纹理。

    sampleCount?: 4

    The sample count of the texture. A GPUTextureDescriptor#sampleCount > 1 indicates a multisampled texture.

    WebGPU只支持4重采样。

    注:修改后将重新创建纹理。

    The width, height, and depth or layer count of the texture.

    由于通过初始化时写入的资源自动计算尺寸处理所有情况难度很大且容易出错,该属性在初始化时必须设置。

    修改尺寸将会引发纹理销毁,使用时重新创建新纹理。