pub struct Recording {
pub passes: Vec<Pass>,
pub extent: Extent2D,
pub ramps: Vec<Ramp>,
}Expand description
A finished recording, ready to submit.
More than one pass where the recording used layers. A layer is drawn into a target of its own and then composited back, which cannot happen in the same pass that samples it: reading an attachment being written needs machinery this does not have, and the separation is what makes group opacity mean “make this subtree, then fade it” rather than “fade each shape in it”.
Fields§
§passes: Vec<Pass>Layers first, each before whatever samples it; the root target last.
The order falls out of how they are recorded rather than being sorted: a layer is finished when it is restored, which is necessarily before the draw that composites it.
extent: Extent2DThe size of the caller’s surface, which is what the root pass renders
at. A layer pass may be smaller; see Pass::extent.
ramps: Vec<Ramp>Gradients whose colors were too many to carry in a material, tabulated.
Recorded here rather than per pass because a slot table is per pass and this is not: the same gradient drawn into a layer and again over it is one ramp named twice.