gpu-curtains
    Preparing search index...

    Interface GPURendererContextOptions

    Options used to configure the renderer canvas context. If not specified, format will be set with GPU.getPreferredCanvasFormat() and alphaMode with premultiplied.

    interface GPURendererContextOptions {
        format: GPUTextureFormat;
        viewFormats?: Iterable<GPUTextureFormat>;
        colorSpace?: PredefinedColorSpace;
        toneMapping?: GPUCanvasToneMapping;
        alphaMode?: GPUCanvasAlphaMode;
    }

    Hierarchy

    • Omit<GPUCanvasConfiguration, "device" | "usage">
      • GPURendererContextOptions
    Index

    Properties

    format: GPUTextureFormat

    The format that textures returned by GPUCanvasContext.getCurrentTexture will have. Must be one of the Supported context formats.

    viewFormats?: Iterable<GPUTextureFormat>

    The formats that views created from textures returned by GPUCanvasContext.getCurrentTexture may use.

    colorSpace?: PredefinedColorSpace

    The color space that values written into textures returned by GPUCanvasContext.getCurrentTexture should be displayed with.

    toneMapping?: GPUCanvasToneMapping

    The tone mapping determines how the content of textures returned by GPUCanvasContext.getCurrentTexture are to be displayed.

    This is a required feature, but user agents might not yet implement it, effectively supporting only the default GPUCanvasToneMapping. In such implementations, this member **should not** exist in its implementation of GPUCanvasConfiguration, to make feature detection possible using GPUCanvasContext.getConfiguration. This is especially important in implementations which otherwise have HDR capabilities (where a '@media/dynamic-range' of ''@media/dynamic-range/high'' would be exposed). If an implementation exposes this member and a `high` dynamic range, it **should** render the canvas as an HDR element, not clamp values to the SDR range of the HDR display.
    alphaMode?: GPUCanvasAlphaMode

    Determines the effect that alpha values will have on the content of textures returned by GPUCanvasContext.getCurrentTexture when read, displayed, or used as an image source.