Base parameters used to create a Texture

interface TextureBaseParams {
    label?: string;
    name?: string;
    fixedSize?: TextureSize;
    qualityRatio?: number;
    type?: TextureBindingType;
    format?: GPUTextureFormat;
    access?: BindingMemoryAccessType;
    viewDimension?: GPUTextureViewDimension;
    sampleCount?: number;
    visibility?: MaterialShadersType[];
    usage?: TextureUsageKeys[];
    autoDestroy?: boolean;
    generateMips?: boolean;
    flipY?: boolean;
    premultipliedAlpha?: boolean;
}

Hierarchy (view full)

Properties

label?: string

The label of the Texture, used to create various GPU objects for debugging purpose

name?: string

Name of the Texture to use in the texture binding

fixedSize?: TextureSize

Optional fixed size of the texture. If set, the Texture will never be resized and always keep that size.

qualityRatio?: number

Force the texture size to be set to the given ratio of the renderer canvas size or fixedSize. Used mainly to shrink render target texture definition.

Whether to use this Texture as a regular, storage or depth texture

format?: GPUTextureFormat

Optional format of the texture, mainly used for storage textures

Optional texture binding memory access type, mainly used for storage textures

viewDimension?: GPUTextureViewDimension

Optional texture view dimension to use

sampleCount?: number

Sample count of the texture, used for multisampling

visibility?: MaterialShadersType[]

The Texture shaders visibility sent to the texture binding

Allowed usages for the GPU texture as an array of texture usages names

autoDestroy?: boolean

Whether any Material using this Texture should automatically destroy it upon destruction. Default to true.

generateMips?: boolean

Whether to generate mips. Default to false.

flipY?: boolean

Whether to flip the source along the Y axis. Default to false.

premultipliedAlpha?: boolean

Whether this texture should be premultiplied or not. Default to false.