Skip to main content

Module frame_snap

Module frame_snap 

Source
Expand description

Frame-time pass that snaps prim, cluster, and clip-tree rects to the device pixel grid. Runs once near the start of frame building, after spatial_tree.update_tree, and writes the snapped_* rect fields that downstream visibility / prepare / batch consumers read.

Functions§

snap_frame_rects
Snap all per-frame rect state that depends on the current spatial tree: each prim’s snapped_local_rect (into draws), each cluster’s snapped_bounding_rect, each prim’s clip-leaf rect, and each clip-tree node’s rect. All snapping happens against the root reference frame in the rect’s own spatial-node space, mirroring the scene-build helper this replaces.