Interface GPUCanvasConfigurationOut

Hierarchy

Properties

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

colorSpace: PredefinedColorSpace

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

device: GPUDevice

The GPUDevice that textures returned by getCurrentTexture will be compatible with.

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

toneMapping?: GPUCanvasToneMapping

The tone mapping determines how the content of textures returned by 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 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.
usage: number

The usage that textures returned by getCurrentTexture will have. RENDER_ATTACHMENT is the default, but is not automatically included if the usage is explicitly set. Be sure to include RENDER_ATTACHMENT when setting a custom usage if you wish to use textures returned by getCurrentTexture as color targets for a render pass.

viewFormats: GPUTextureFormat[]

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

Generated using TypeDoc