@lightningjs/renderer
    Preparing search index...

    Interface TextureData

    TextureData that is used to populate a CoreContextTexture

    interface TextureData {
        data:
            | HTMLCanvasElement
            | ImageBitmap
            | ImageData
            | HTMLImageElement
            | Uint8Array<ArrayBufferLike>
            | CompressedData
            | SubTextureProps
            | null;
        premultiplied?: boolean;
        premultiplyAlpha?: boolean | null;
    }
    Index
    data:
        | HTMLCanvasElement
        | ImageBitmap
        | ImageData
        | HTMLImageElement
        | Uint8Array<ArrayBufferLike>
        | CompressedData
        | SubTextureProps
        | null

    The texture data

    premultiplied?: boolean

    Whether the pixel data is already premultiplied (e.g. produced by createImageBitmap with premultiplyAlpha: 'premultiply').

    This flag is only meaningful for ImageBitmap data sources. When true, UNPACK_PREMULTIPLY_ALPHA_WEBGL is set to false at upload time to prevent double-premultiplication. When false, the flag is set to true so the WebGL driver premultiplies during the CPU→GPU copy (same path as HTMLImageElement). When undefined, behaviour falls back to the legacy assumption that all ImageBitmap sources are already premultiplied.

    Platforms that call createImageBitmap without the premultiplyAlpha: 'premultiply' option (e.g. WebPlatformChrome50) must set this to false, otherwise the renderer composites straight-alpha pixels against a blendFunc(ONE, ONE_MINUS_SRC_ALPHA) equation and produces incorrect results on older WPEWebKit.

    undefined (treated as true for ImageBitmap sources)

    premultiplyAlpha?: boolean | null

    Premultiply alpha when uploading texture data to the GPU

    false