ColorAttachment
Defined in: packages/typegpu/src/core/commandEncoder/attachments.ts:25
Properties
Section titled “Properties”clearValue?
Section titled “clearValue?”
optionalclearValue: readonly [number,number,number,number] |GPUColor
Defined in: packages/typegpu/src/core/commandEncoder/attachments.ts:62
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.
depthSlice?
Section titled “depthSlice?”
optionaldepthSlice:number
Defined in: packages/typegpu/src/core/commandEncoder/attachments.ts:41
Indicates the depth slice index of GPUTextureViewDimension#“3d” GPURenderPassColorAttachment#view that will be output to for this color attachment.
loadOp?
Section titled “loadOp?”
optionalloadOp:GPULoadOp
Defined in: packages/typegpu/src/core/commandEncoder/attachments.ts:70
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.
Default
Section titled “Default”'clear'resolveTarget?
Section titled “resolveTarget?”
optionalresolveTarget:GPUCanvasContext|GPUTextureView|ColorTextureConstraint&RenderFlag|TgpuTextureView<WgslTexture<WgslTextureProps>> |TgpuTextureRenderView
Defined in: packages/typegpu/src/core/commandEncoder/attachments.ts:47
A GPUTextureView describing the texture subresource that will receive the resolved output for this color attachment if GPURenderPassColorAttachment#view is multisampled.
storeOp?
Section titled “storeOp?”
optionalstoreOp:GPUStoreOp
Defined in: packages/typegpu/src/core/commandEncoder/attachments.ts:77
The store operation to perform on GPURenderPassColorAttachment#view after executing the render pass.
Default
Section titled “Default”'store'view:
GPUCanvasContext|GPUTextureView|ColorTextureConstraint&RenderFlag|TgpuTextureView<WgslTexture<WgslTextureProps>> |TgpuTextureRenderView
Defined in: packages/typegpu/src/core/commandEncoder/attachments.ts:30
A GPUTextureView describing the texture subresource that will be output to for this color attachment.