Skip to content

DepthStencilAttachment

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

optional depthClearValue: number

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

Indicates the value to clear GPURenderPassDepthStencilAttachment#view’s depth component to prior to executing the render pass. Ignored if GPURenderPassDepthStencilAttachment#depthLoadOp is not GPULoadOp#“clear”. Must be between 0.0 and 1.0, inclusive (unless unrestricted depth is enabled).


optional depthLoadOp: GPULoadOp

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

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


optional depthReadOnly: boolean

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

Indicates that the depth component of GPURenderPassDepthStencilAttachment#view is read only.


optional depthStoreOp: GPUStoreOp

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

The store operation to perform on GPURenderPassDepthStencilAttachment#view’s depth component after executing the render pass.


optional stencilClearValue: number

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

Indicates the value to clear GPURenderPassDepthStencilAttachment#view’s stencil component to prior to executing the render pass. Ignored if GPURenderPassDepthStencilAttachment#stencilLoadOp is not GPULoadOp#“clear”. The value will be converted to the type of the stencil aspect of view by taking the same number of LSBs as the number of bits in the stencil aspect of one texel of view.


optional stencilLoadOp: GPULoadOp

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

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


optional stencilReadOnly: boolean

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

Indicates that the stencil component of GPURenderPassDepthStencilAttachment#view is read only.


optional stencilStoreOp: GPUStoreOp

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

The store operation to perform on GPURenderPassDepthStencilAttachment#view’s stencil component after executing the render pass.


view: GPUTextureView | TgpuTextureRenderView | DepthStencilTextureConstraint & RenderFlag | TgpuTextureView<WgslTextureDepth2d | WgslTextureDepthMultisampled2d>

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

The texture subresource that will be output to and read from for this depth/stencil attachment.