WGPUCompositeAlphaMode

Describes how frames are composited with other contents on the screen when wgpuSurfacePresent is called.

Entries

Link copied to clipboard

Lets the WebGPU implementation choose the best mode (supported, and with the best performance) between WGPUCompositeAlphaMode.Opaque or WGPUCompositeAlphaMode.Inherit.

Link copied to clipboard

The alpha component of the image is ignored and teated as if it is always 1.0.

Link copied to clipboard

The alpha component is respected and non-alpha components are assumed to be already multiplied with the alpha component. For example, (0.5, 0, 0, 0.5) is semi-transparent bright red.

Link copied to clipboard

The alpha component is respected and non-alpha components are assumed to NOT be already multiplied with the alpha component. For example, (1.0, 0, 0, 0.5) is semi-transparent bright red.

Link copied to clipboard

The handling of the alpha component is unknown to WebGPU and should be handled by the application using system-specific APIs. This mode may be unavailable (for example on Wasm).

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val value: Int

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.