pub struct DepthStencilAttachment {
pub view: Option<JsValue>,
pub depth_clear: Option<f64>,
pub depth_load_op: LoadOp,
pub depth_store_op: StoreOp,
pub depth_read_only: bool,
}Expand description
The depth-stencil attachment of a render pass.
Replaces the historical RenderPassDepthStencilAttachment. As with
ColorAttachment, the optional load and store op strings are
replaced by typed ops, and the clear depth is None-able so that
“clear to 1.0” and “keep what is there” are distinguishable at the
type level rather than by which fields happen to be set.
Fields§
§view: Option<JsValue>The depth-stencil texture view to use, or None to let the
renderer use the default view into its own depth texture,
allocating that texture lazily if needed.
depth_clear: Option<f64>The depth to overwrite the attachment with when depth_load_op is
LoadOp::Clear, in 0.0..=1.0. None means no clear, so
depth_load_op must then be LoadOp::Load.
depth_load_op: LoadOpWhat to do with the existing depth before drawing.
depth_store_op: StoreOpWhat to do with the depth once the pass ends.
depth_read_only: boolWhether the pass reads depth without writing it. true lets the
driver skip the depth write entirely.