feat(render): a reduced column can be graded by dwell, not drawn as one flat band
A pixel column reduced from a dense envelope is honest about where the signal went and silent about how long it was there: its min and max are identical whether its samples fill the span or pile at its two ends, so a ramp and a pulse are one band. Style::intensity_grading grades it instead -- bright where the signal sits, faint where it only passes through -- by asking the gather for a level finer than the pixel grid and reading the distribution from those sub-buckets. Off by default: a change of look, not a correction of one. The measure is dwell per row, each segment depositing one unit spread over the rows it spans; counting +1 per row instead grades a sine's fast middle as brightly as its rails, which is the pattern inverted. The accumulator is one column wide (a full w*h density image is 33 MB at 4K) with each span written as two delta writes, and normalisation is against the column's own peak -- a frame-wide scale fades the trace out exactly where it moves fastest. Alpha is quantised into tiers, one LineBatch and one draw call each, because the line pipeline's colour is a uniform and a per-segment alpha is inexpressible. The finer ask is floored at level 1 whenever the flat path would have used the pyramid: level_for() answers 0 -- raw samples -- as soon as a sub-column falls under one bucket, so an unfloored ask turns a moderately dense frame into an O(visible) gather (measured at 172 samples a pixel: raw=1154 lod=0 and 6.4 ms a frame against raw=710 lod=453 and 2.3 ms). Grading is a way of drawing a reduction and may not undo it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
e81e84645f
commit
cc908efa36
6 files changed
+629
-13
No files matched your search
@@ -43,6 +43,12 @@ run touched a GPU, so read it as an upper bound and a record of the software pat
|
||||
column at as many sub-pixel phases, and the beat between the bucket pitch and the pixel pitch
|
||||
is a crawling moiré; one segment per column leaves one phase, so there is nothing to beat
|
||||
(`FrameStats::column_traces`, and `docs/data-and-performance.md` for the four rules it keeps);
|
||||
- and such a column can be drawn **graded by dwell** instead of as one flat band
|
||||
(`Style::intensity_grading`, off by default, `FrameStats::graded_traces`): bright where the
|
||||
signal sits, faint where it only passes through, the way a digital-phosphor scope reads. It is
|
||||
what puts back the information the reduction throws away — a column's min and max are the same
|
||||
whether its samples fill the span or pile at its two ends — so the gather is asked at a level
|
||||
finer than the pixel grid and the distribution read from those sub-buckets;
|
||||
- sample **markers** when a window is sparse enough that its samples are the shape
|
||||
(`Style::marker_below_samples`, 50 by default, `marker_px` across, in the trace's own colour);
|
||||
- grid with independent major/minor line classes (`Style::grid_major_visible`,
|
||||
|
||||
Reference in new issue
Block a user