Skip to content

ColorAttachment

Defined in: packages/typegpu/src/core/commandEncoder/attachments.ts:26

optional clearValue: readonly [number, number, number, number] | GPUColor

Defined in: packages/typegpu/src/core/commandEncoder/attachments.ts:63

Indicates the value to clear GPURenderPassColorAttachment#view to prior to executing the render pass. If not provided, defaults to {r: 0, g: 0, b: 0, a: 0}. Ignored if GPURenderPassColorAttachment#loadOp is not GPULoadOp#“clear”. The components of GPURenderPassColorAttachment#clearValue are all double values. They are converted to a texel value of texture format matching the render attachment. If conversion fails, a validation error is generated.


optional depthSlice: number

Defined in: packages/typegpu/src/core/commandEncoder/attachments.ts:42

Indicates the depth slice index of GPUTextureViewDimension#“3d” GPURenderPassColorAttachment#view that will be output to for this color attachment.


optional loadOp: GPULoadOp

Defined in: packages/typegpu/src/core/commandEncoder/attachments.ts:71

Indicates the load operation to perform on GPURenderPassColorAttachment#view prior to executing the render pass. Note: It is recommended to prefer clearing; see GPULoadOp#“clear” for details.

'clear'

optional resolveTarget: TgpuTextureRenderView | GPUCanvasContext | GPUTextureView | ColorTextureConstraint & RenderFlag | TgpuTextureView<WgslTexture<WgslTextureProps>>

Defined in: packages/typegpu/src/core/commandEncoder/attachments.ts:48

A GPUTextureView describing the texture subresource that will receive the resolved output for this color attachment if GPURenderPassColorAttachment#view is multisampled.


optional storeOp: GPUStoreOp

Defined in: packages/typegpu/src/core/commandEncoder/attachments.ts:78

The store operation to perform on GPURenderPassColorAttachment#view after executing the render pass.

'store'

view: TgpuTextureRenderView | GPUCanvasContext | GPUTextureView | ColorTextureConstraint & RenderFlag | TgpuTextureView<WgslTexture<WgslTextureProps>>

Defined in: packages/typegpu/src/core/commandEncoder/attachments.ts:31

A GPUTextureView describing the texture subresource that will be output to for this color attachment.

© Software Mansion 2026. All trademarks and copyrights belong to their respective owners. Read about our Privacy Policy.