Base parameters used to create a DOMTexture

interface DOMTextureBaseParams {
    generateMips?: boolean;
    flipY?: boolean;
    premultipliedAlpha?: boolean;
    format?: GPUTextureFormat;
    placeholderColor?: [number, number, number, number];
    useExternalTextures?: boolean;
    viewDimension?: GPUTextureViewDimension;
    visibility?: MaterialShadersType[];
    cache?: boolean;
    label?: string;
    name?: string;
}

Hierarchy (view full)

Properties

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.

format?: GPUTextureFormat

The GPUTextureFormat | texture format to use. Default to 'rgba8unorm'.

placeholderColor?: [number, number, number, number]

Solid color used by temporary texture to display while loading the source. Default to [0, 0, 0, 255] (solid black).

useExternalTextures?: boolean

Whether video textures should use GPUExternalTexture or not. Default to true.

viewDimension?: GPUTextureViewDimension

The GPUTextureViewDimension | texture view dimension to use. Default to '2d'.

visibility?: MaterialShadersType[]

The texture shaders visibility sent to the texture binding. Default to 'fragment'.

cache?: boolean

Whether to keep the texture in the renderer cache when a Material tries to destroy it. Default to true.

label?: string

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

name?: string

Name of the DOMTexture to use in the binding