4 Commits
Author SHA1 Message Date
shinyobjectz ee42e31469 NB2a: stat channels and pass timings chosen and read from TypeScript
io/trace's stats.rs: a stat channel is a RAEA_ variable's name without RAEA_ (bake_trace, trace, bevy_passes), on
when the composition chose it (native("stats.on", { channels }) at its top level), when RAEA_STATS lists it, or when
its variable is set, the override. The 51 reads of 24 trace and stat variables go through raea_io_trace::stat. Each
of Bevy's render passes (RenderDiagnosticsPlugin, on by bevy_passes) and PassTimer's go into the run's totals, with
the counters engine/draws and engine/updates; native("stats.read", {}) returns them, and a run that chose a channel
prints the table and keeps stats.json in its trace folder (docs/manual/reference/cli/traces.md).

tools/nobuild.sh stats checks it: every channel decided done reads through stat(); the scene choosing bevy_passes and
trace traces, reads 9 passes and 11 draws back on its last frame, prints the table and keeps stats.json; with nothing
chosen nothing prints; RAEA_TRACE=1 and RAEA_STATS give the same trace lines. 12 frames take 12 updates.

raea-render's lines stay as they were (NB4a's plugin choice folded to one line). native-calls.ts gains the two calls,
and bevy.app.*, which raea registers now that the macOS build links the plugin catalog.
2026-11-22 09:15:58 -08:00
shinyobjectz 2e5f9d7755 RR1: every look changes per frame. Each frame's post-processing is its own (runtime/look post.rs), and a set that changes goes in a per-frame table (frame_sets) laid onto the camera's row frame by frame; the camera takes a group off and puts it on again when its columns change (raea-sys-post camera.rs, moved out of raea-runtime-scene3d; volumetric fog's group is raea-sys-fog-half's, which raea-runtime-scene3d hands to it, as a system can't use another sideways). Each light's colour, shadows and shafts change the same way. A draw across a cut (a sky, AO, anti-aliasing, a tonemapper, shadows or volumetric fog coming or going) warms up 8 updates as a load does, so the sky's light is there on a cut's first frame; a ramp is no cut. Play builds its rows the same way: a row with a table is never still (a play's first frame has its sky), depth of field comes and goes with the frames that have one, the page background is keyed, and a seek back that makes a new engine sets play's rows on it again. bench/rerender/rr1.sh: the film as one composition equals its six shot renders 900/900; a 60-frame grade, bloom and fog ramp equals 60 stills 60/60 at SSIM 1.000000; play draws the looks as the render does at 12 seeks and 2 seeks back (the HTML caption over the 3D still differs by up to 2 levels at its edges, as before RR1). The supersample downsample moves to raea-runtime-gpuframe, and light_sig and pass_column to raea-runtime-look, keeping raea-render and raea-runtime-scene under 2,000 lines. 2026-11-10 14:03:56 -08:00
shinyobjectzandJameschuthink 97d93d244f Direct render: the 2D image rows' Blitz page (a Bevy App) is made on its first draw, not with the view, so a render that never draws an image row makes none (closes #70)
rows2d::Rows keeps an Option<Page> built by page() on first use with the same arguments; draw returns R<bool>
since building can fail there now, and the engine's overlay (runtime/gpuframe overlay.rs) logs and skips that frame's
rows on an error, as it already does for rgba(). texture() is None before the first draw.

Checked on an M-series Mac, release build, RAEA_EXPORT_CACHE=0, a 30-frame 800x1000 TSX with a moving text box
(and the same with an <Img> on frames 10-19; a TSX page arrives on the GPU, so neither draws an image row): one
warm-up, then 5 runs each, two rounds in swapped order. Median 0.395 s -> 0.312 s (about 83 ms a render). Frames
identical by framemd5 on both, the <Img> red on exactly frames 10-19 in both builds.

Co-authored-by: Jameschuthink <[email protected]>
2026-11-09 08:46:40 -08:00
shinyobjectz f675b0ad2b raea dc579e418 2026-10-31 13:15:29 -07:00