Parameters used to copy an external image to a texture, i.e. that will be uploaded to the GPU using GPUQueue#copyExternalImageToTexture | copyExternalImageToTexture

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

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.