Skip to main content

collect_graphics

Function collect_graphics 

Source
fn collect_graphics(
    stage: &Stage,
    start: NodeId,
    exclude: &HashSet<NodeId>,
) -> CollectedGraphics
Expand description

Walk the scene and bucket every primitive a Graphics node emits, separated into:

  • SDF instances (rect / rounded rect / ellipse / line / arc),
  • polygon triangles (variable-vertex-count primitives that go through the dedicated graphics_polygon.wgsl path).

Both buckets group by blend mode in encounter order so each batch binds its matching pipeline.