-
Notifications
You must be signed in to change notification settings - Fork 204
Open
Labels
C-cpuApplies to the vello_cpu crateApplies to the vello_cpu crateC-sparse-stripsApplies to sparse strips variants of vello in generalApplies to sparse strips variants of vello in general
Description
Filter effects (blur, drop shadow) render incorrectly when filtered elements are near or extend beyond viewport boundaries. Filters operate on incomplete data because geometry is culled before filter expansion is calculated.
Culling happens too early in the pipeline:
make_tiles— Culls geometry to viewport, castingf32→u16- Filter expansion calculated in
pop_layer()— After culling
Coordinates are unsigned u16, cannot represent negative values or pre-expand viewport:
pub struct Strip {
pub x: u16,
pub y: u16,
}
pub struct Tile {
pub x: u16,
pub y: u16,
}Proposed Solutions:
- Option 1: Negative Coordinates: change all coordinates from
u16toi16.- Cons: massive refactor.
- Option 2: Layer-Local Coordinates: render filtered layers in their own space starting from (0,0), then composite with offset.
- Cons: coordinate mapping complexity; perf — If multiple elements in a layer extend beyond the viewport by different amounts, computing the final layer bbox becomes more complex, each element that expands the bounds might force bbox to grow, which in turn might shift element positions and requires making new tiling based on the updated coordinates.
- Option 3: apply a fixed large offset to all geometry rendered in filtered layers, keeping
u16coordinates. Store the offset in the layer and apply the inverse during fine rasterization (compositing).- Cons: poor perf, complex logic.
Metadata
Metadata
Assignees
Labels
C-cpuApplies to the vello_cpu crateApplies to the vello_cpu crateC-sparse-stripsApplies to sparse strips variants of vello in generalApplies to sparse strips variants of vello in general