Commit Graph
72 Commits
Author SHA1 Message Date
shinyobjectz f8c16d2656 nobuild: the crates' sizes, layers, taxonomy and licences L1 checks
raea-sys-frame was past its 2,000 lines: the engine's own shaders move to their own crate, raea-sys-engine-shaders
(<ShaderConstants>' type is raea_sys_engine_shaders::consts::ShaderConstants), and the path tracer moves into
raea-sys-rt beside the traced passes that use it (<Pathtracer>'s type is raea_sys_rt::pathtracer::PathtracerSettings).
raea-render was past its limit too: the AOV prepasses and readback move into raea-sys-compose::aov, raea-render
keeps the plugin and its want/capture. raea-render-raytrace, raea-sys-fog, raea-runtime-export and raea-render name
the new paths; tools/layers.toml places raea-sys-gi and raea-sys-engine-shaders; tools/taxonomy.list has
ShaderConstants.

tools/licenses.sh measures raea-cli without the plugin catalog's edge (the catalog is its own feature), so NOTICE's
catalog and LICENSES/ drop 18 crates only the catalog's optional plugins reached; NOTICE's opening sentence still
covers every crate in Cargo.lock.
2026-11-22 09:15:58 -08:00
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 f2bf93cbee NB4a: an Engine adds only the catalog plugins its project chooses; raea-cli's catalog feature compiles them all in
package.json raea.plugins (a list of names, or declarations keyed by name) chooses them, a scene's components and
resources under a plugin's crate add that plugin, and each chosen plugin brings the ones it needs. raea's own
registrations and a build without the catalog are unchanged. The run's trace records what was chosen and why
(plugins_chosen), and a name the build lacks is said once. sync writes engine/bevy-plugins' catalog feature: every
declared plugin but those declared "catalog": false (bevy, Bevy's optional features). tools/nobuild.sh catalog renders
and plays a project choosing avian and hanabi, and compares scenes that choose none against a raea without the catalog.
2026-11-22 09:15:58 -08:00
shinyobjectz b3c2394cb7 A constant in any engine shader is set from TypeScript: <ShaderConstants>, and <SolariLighting constants> for Solari's
<ShaderConstants shader="bevy_solari/realtime/restir.wesl" values={{ SPATIAL_REUSE_RADIUS_PIXELS: 24 }} /> (raea/pbr)
puts a reflected raea_sys_frame::engine_shaders::consts::ShaderConstants on a bare entity. When an Engine opens, the
first frame's component rows are read and each named `const NAME ... = EXPR;` is rewritten before anything compiles,
in whichever text the Engine draws with (the binary's, a project's engine-shaders/ copy, or RAEA_ENGINE_SHADERS'
copy). An embedded shader is rewritten in the registry and swapped in Assets<Shader> as its first load lands. A shader
a crate hands to wgpu (emit_taa, the MetalFX guides) gets the constant through engine_shaders::text. The const keeps
its type: a float literal, or an expression of floats such as PI, takes a float; a u32 or an i32 takes a whole number;
a bool takes a boolean. A name the shader doesn't declare, an array, a vector, or a shader the Engine doesn't have is
reported and left alone. The constants are compiled in once, so a value that a later frame brings or changes isn't
drawn, and raea says so once. The trace's engine_shaders and engine_shader_text events give each changed shader's text
by its FNV hash. Two runs drew with the same shaders when the hashes agree, whatever the pixel noise.

<SolariLighting constants> types thirteen of Solari's and the denoiser's: spatialReuse, mirrorRoughness, cacheEnd,
cacheLifetime, cacheSearch, the three reconnect rules, mirror's four (RT17's replacement rules) and emissiveHistory
(emit_taa's HISTORY_CAP).

Checked:
- PI = 4.5 in bevy_render/maths.wesl, from <ShaderConstants> and as the same edit in engine-shaders/, compiles to the
  same text (0xc654f1dc03f921b3), and the pixels are identical on all four frames (max difference 0). 57% of the
  pixels moved from the plain run.
- On the desk under Solari, constants={{ mirrorRoughness: 0.3, emissiveHistory: 2 }} and the same two edits in
  engine-shaders/ compile the same bindings.wesl (0xf8394379c716471c) and emit_taa (0x66661df32dc6be6b). Both mirror
  the monitor stand's base; the plain run doesn't.
- A missing name, an array (look.wesl's DARK) and a missing shader are each reported, and those shaders are left
  unchanged.
- The SDK manual pages are regenerated, and the 3D guides say how to use the constants.

docs/nobuild.feature NB1a.
2026-11-22 09:15:58 -08:00
shinyobjectz 737468b8cd The engine's own shaders open to a project: a file in engine-shaders/ replaces one from its first frame, with no build
A project's engine-shaders/ folder mirrors the paths Bevy embeds shaders at, <crate>/<path under its src>
(engine-shaders/bevy_pbr/render/pbr.wesl, engine-shaders/raea_render_raytrace/emit_taa.wgsl). When an Engine opens,
after every plugin has embedded its shaders, each file there replaces the binary's in Bevy's EmbeddedAssetRegistry,
and raea names them and warns that each is tied to this raea's version. A shader whose plugin loaded it during build
(load_shader_library!) is swapped in Assets<Shader> in PreUpdate, right after the asset server hands over its first
load, so the pipelines' first compile has the file's text. An AssetServer::reload would land some frames later and
recompile every pipeline that used it partway through a render. An empty file is filled with the shader this raea
draws with, so an author has the original to start from without the sources. A file that matches no engine shader is
reported as stray.

RAEA_ENGINE_SHADERS=DIR points at a raea checkout. Every .wgsl and .wesl in its git tree is read at its embedded path
(the crate named by the nearest Cargo.toml), so a session that edits an engine shader renders the edit without a
build. raea prints how many of them differ from the binary's. raea's runtime forks of Bevy's shaders
(swap_embedded_shader: shadows, volumetric fog, dof, post, the environment filter) are made from Bevy's original at
load, so tree mode leaves them as made. raea-render-raytrace's own wgpu shaders (the MetalFX guides and emit_taa)
are read the same way through engine_shaders::text, and are declared with their built-in text so they can be filled.

Checked on a lit scene and on the desk room under Solari:
- the unchanged pbr.wesl as an override is pixel-identical on all four frames;
- an inverted pbr.wesl inverts 57% of the pixels from frame 0 on;
- the same edit through RAEA_ENGINE_SHADERS gives the same pixels (max difference 0);
- emit_taa with its restore removed takes the screen's green from 67-69 to 29.8 (project) and 29.9 (tree);
- the real checkout in tree mode reads 110 shaders, none unlike the binary's, and lands 0.2 levels from a plain run,
  within run-to-run spread (two plain runs differ by 6.2);
- empty files are filled byte for byte with vendor/bevy_pbr's pbr.wesl and raytrace's two shaders.

docs/nobuild.feature NB5b; the 3D limits guide says how an author uses it.
2026-11-22 09:15:58 -08:00
shinyobjectz 3796d708db Renders draw each frame once: the Engine's reads skip the frame drawn last
Before each frame f, a render with 3D drew frame f - 1 again, so the Engine's reads (S2d) answer from f - 1's World. In
order, f - 1 is the frame drawn last and its World is f - 1's already; engine_before's comment said that frame was left
as it was, but Engine::draw skips a redraw only when a Bevy plugin is active. So every frame of a render drew twice,
and every temporal pass (Solari's, MetalFX's, the split emission's) took a second update in which nothing moved, which
live play never draws. With MotionBlur's pre-step on top, a blurred render drew each frame four times.

Engine::drawn says which frame drew last, and engine_before draws f - 1 only when it isn't.

Measured (lightbench window.tsx under Solari, 150 frames): the emission pass ran 307 times, now 158 (150 and the
load's 8 warm-ups); live play runs it once a presented frame. A moving orb's rim, seen still on each second draw,
had stayed as rings at every place it had been. The bevy-ts cases: 89 pass and 4 open before and after (the
world-read cases among the passes), in 1m55s instead of 2m23s. Motion blur unchanged: the shutter's three scores
(0.002, 0.067/0.034, 0.044/0.044), a camera's jump 0.00 levels off the sharp frame, a dash blurred from frame 1.
2026-11-22 09:15:58 -08:00
shinyobjectz 2929ce6a04 Camera cuts: a camera that jumps drops its history, and motion blur skips the jump
A cut to another camera was marked (Shots, RR2), but one camera moved far
in one frame, as a game's respawn or teleport moves it, was not. Solari's
and MetalFX's history carried the last view into the new one for half a
second, steady's filter blended it in, and motion blur streaked every pixel
along the jump.

raea-sys-post cut.rs sets CameraCut on each 3D camera every frame. A jump is
a turn of more than half the field of view in one frame, a lens changed by
half or more, or a step ten times the camera's recent pace and longer than
ten near planes. A camera's first move after it appears or cuts opens a
shot and is no step cut, unless it was seen resting first (unmoved across
two consecutive film frames). So a shot that opens on a fast move keeps its
blur, and so does a frame drawn alone with --at: the engine loads that
frame's pose at frame 0, then steps from the frame before. On a cut,
Solari's reset is set (MetalFX's denoiser, its scaler and emit_taa follow
it), steady starts its history again, and the shutter draws nothing.

Measured (lightbench window.tsx at 736x981 under Solari, the live preset;
each frame after the cut against the new view settled; worst 1/8 tile):
- one camera jumping to a view it never saw: first three frames 0.50, 0.43,
  0.38 stops -> 0.17, 0.13, 0.12 (a reset by hand: 0.14, 0.13, 0.12)
- a 90-degree flick in 15 frames: unchanged (no cut), 0.11 stops at its end
- blur.tsx, a 3 m jump with blur on: the jump frame 70.8 levels off the
  sharp frame -> 0.0. A pan of 1.5 m a frame from frame 0 is still blurred
  from frame 1, and its --at frame matches the full render's
- the three shutter scores unchanged (0.002, 0.067/0.034, 0.044/0.044)

Steady's reset follows the same flag; no steady scene was cut here.
2026-11-22 09:15:58 -08:00
shinyobjectz 2ca930d81e LT3: the world cache's light reaches the screen, each pixel reading it at its own surface (raea-sys-gi, RAEA_GI=1)
A measuring step, as LT2's irradiance volume was meant to be. raea-sys-gi's screen pass, between the prepass and the
main pass, reads the world cache at each pixel's own surface (from the depth and normal prepasses), takes out the
sun's share (each cell now keeps a mean of how often it sees the sun: cache.wesl sunlit, 4 MiB), and writes it a
texel a pixel. The main pass draws it in place of the irradiance volume, the environment map's diffuse and the
ambient light (vendored bevy_pbr: RaeaGiScreen, mesh view binding 41, read by textureLoad, so a hooked material at
Metal's 16 samplers still builds; zeros where a view has none). The cache's lookup loads before it writes, as a cell
is read by hundreds of pixels. GI cameras get their depth and normal prepasses with MSAA off.

LT14, LT1 raster before against after (binding 41 bound to zeros): FLOOR3 mean 1.379/1.379, bias -0.801/-0.801,
worst 3.370/3.371, flicker 0.101/0.101; glade 1.758/1.758, 1.542/1.542, 3.000/3.000, 0.817/0.817. Live: FLOOR3
12.6/13.7 ms, gambit-walk 49.0/42.6, kitchen 54.9/56.5 timed back to back (61.7 beside another build).
With the temporal filter, raster against gi: glade mean 1.750/1.474, bias 1.532/1.241, worst 2.953/2.948, flicker
0.788/0.780, against a reference that is near black and has no fog (LT5). FLOOR3 goes 4.8 stops dark: it is lit only
by its panels' emission, which no cell knows yet (LT4's first tier); live 14.5/16.3 ms, the cache 0.92 ms of GPU.
2026-11-22 09:15:58 -08:00
shinyobjectz 4946bf9c00 LT12: raea's own temporal filter, the levels' dither moving under it, and the light check pre-rolled
<AntiAliasing mode="steady"> (or RAEA_STEADY on every 3D camera) draws each frame from one of 16 Halton places
inside its pixels and blends it with the frames before (raea-sys-post steady.rs, steady.wesl): the past fetched by
the depth and motion prepasses at the nearest neighbour's motion, clipped to the 3x3 YCoCg spread, blended in linear
light at 1/n down to 1/32 still and 1/8 moving. MSAA goes off under it. Under a jittered view the levels' cross-fade
dither moves to another of its 16 places each frame, in the main pass and the prepass alike (vendored bevy_pbr), so
the filter averages it to its share: on Berlin's 1440p fly the dot bands are gone at full size, and the walk's
heroes leave no trail. The far city's roof slopes alias more without MSAA (prefiltered far levels, LT21).

raea light check now draws 16 frames before each still or shot that doesn't follow the one before, unmeasured, so
whatever keeps a past has its own; and it never steadies the path-traced reference, whose jitter read as the paths'
flicker (FLOOR3 0.478 stops of the reference's own).

LT14, LT1 raster without against with the filter (both pre-rolled):
  FLOOR3  mean 1.379/1.392, bias -0.801/-0.816, worst 3.370/3.392, flicker 0.101/0.111, live 12.6/14.5 ms
  glade   mean 1.758/1.750, bias 1.542/1.532, worst 3.000/2.953, flicker 0.817/0.788
  gambit-walk live 49.0/44.1 ms; kitchen live 53.8/55.6 ms
Live 2560x1440 work p50, median of 3, MSAA 4x against steady: walk 53.0/55.0, fly 47.3/42.5 ms.
Off by default, so LT1's numbers without it are unchanged.
2026-11-22 09:15:58 -08:00
shinyobjectz a0dad6afbc LT21: past the last cascade the sun's shadow comes from a map traced against the ray scene
Past its last shadow cascade (300 m in gambit's CityShot) Bevy draws everything lit, and the fade added before only
softened the line, so on the fly the street went white past it. The sun's shadow there now comes from a map of the
sun's view traced against the ray scene (raea-sys-rt far.rs, far.wesl): 2 km square, 4096 texels a side, each one
ray down along the sun to its first shadow caster, holding how high along the sun it hit. raea-sys-lod's swap of
shadows.wesl fades the last cascade into it and reads it past the cascades (four texels, bilinear, a texel's normal
offset and a slope bias). Not a ray a pixel: the game's camera has no depth prepass, and one would draw all of
Berlin again. Bevy's mesh view group has no hook for another binding, so bevy_pbr is vendored for two (39, 40:
RaeaFarSun, a stand-in and a uniform of zeros where there's none; docs/bevy-upgrade.md).

A texel is kept at its column modulo the map's size, so the map follows the eye eight texels at a time and traces
only the strip new to it; after the TLAS changes it traces 256 rows a frame again, in turn; the whole map only on
the first frame or when the sun turns. On the 1440p fly (GPU timestamps, p50): a strip 0.38 ms (36,500 rays), 256
rows 0.28 ms; the whole map once, 16 to 31 ms. A first version re-traced the whole map every 128 m: a 16 ms hitch,
and its edge fade stepped. Off unless RAEA_SUN_FAR is set (metres each way, 1024 for 1).

Live at 2560x1440 (median of 3, work p50, without against with): walk 51.1 against 50.4 ms, fly 54.5 against
45.6, inside the runs' 5 to 10 ms spread. On the fly the street and the far blocks keep their shadows to the
horizon; popped tiles are as before but for 0.4% more, far chimney shadows shimmering at 600 m to 1 km.

LT14, LT1 on raster, before (the branch before this) / off / on (RAEA_SUN_FAR=1):
  floor3-room  mean 1.379 / 1.379 / 1.379, bias -0.801 all, worst 3.370 / 3.366 / 3.372, flicker 0.101 all,
               live 14.4 / 13.8 / 13.6 ms, work p50 13.8 / 14.1 / 13.9
  glade        mean 1.758, bias 1.542, worst 3.000, flicker 0.817, all three alike
  gambit-walk  live 51.8 / 48.8 / 44.4 ms, work p50 50.0 / 44.9 / 42.4 (no reference yet, LT5)
  kitchen      live 61.0 / 54.3 / 55.6 ms, work p50 59.4 / 53.0 / 55.2 (no reference yet)
Another session's jobs ran beside them; the live numbers are within that noise.
2026-11-22 09:15:58 -08:00
shinyobjectz 4bdc4749e4 SG4: a part whose entity had already gone is an error naming it and the frame
The frame store's despawn used World::despawn, which only logs "Could not despawn entity" when the entity is gone
(despawned with another row it hung from) and carries on while the part is drawn wrong. It now uses try_despawn,
drops the row from the store either way, and returns an error naming the row's kind and id; remove_rows_from and
Engine::remove_rows pass it on, and a render fails on it with the frame ("frame N: Could not despawn entity: the text
part 'quote' had already gone ..."). The store test covers it.
2026-11-21 17:02:16 -08:00
shinyobjectz 84b7659b09 Worn paint is a surface shader of raea's own; raea-sys-wear goes (docs/examples.feature EX9)
MeshStandardMaterial's wear and raea/pbr's <WearExtension> drew with the engine's own MaterialExtension
(systems/wear). They now write the same shader on the public surface hook (sdk/render/src/worn.ts, WORN_WESL: the
same noise, curvature edges, grime, rust and chips, in the mesh's own space), so wear is an author's shader like any
other and raea/wear's weather and the paint wear share one path. A parity scene (sharp, turned and round parts, every
setting) renders the same as before, RMSE 3.8e-5 of full scale. One change: clay draws custom surface shaders as they
are, so worn paint now shows in a clay render, as a ShaderExtension's does.

Deleted: systems/wear, its WearPlugin, its spawn branch, its mesh-row columns, its layer entries, and its type in
the registry snapshot, bevy.gen.tsx and sdk-coverage (reached 1557 -> 1556: the type is gone; wear is still
authored). wear with shader or grid on one material is refused (it was silently dropped). WearExtension keeps its
props, so the guides are unchanged; it carries no @bevy tag of its own now, since its Bevy type is ShaderExtension's.
2026-11-19 09:53:04 -08:00
shinyobjectz 4f74e7e754 #182: no Engine makes an event loop, in any build, so 3D renders on Linux
raea's headless Engines (raea-render's, the page's BlitzPage) left Bevy's WinitPlugin out only when a registered
plugin that brought bevy_winit said so (hanabi's x11, raea-page-host's window). A build that brought it some other
way, cargo unifying features across `-p raea-cli -p raea-page-host --features raea-page-host/window` or the whole
workspace, kept it on: each App made an event loop, winit allows one a process, and every 3D render and play
panicked "Failed to build event loop: RecreationAttempt" on Linux (with no display: "neither WAYLAND_DISPLAY nor
... DISPLAY is set"), while a page rendered.

raea-runtime-plugins now compiles bevy_winit in on the desktop (x11 on Linux, loaded at run time, never opened)
and its group() always leaves WinitPlugin out, however the build brought it. The lockfile already held the graph
(winit was in for raea play's window). A unit test says so on macOS and Ubuntu (CI's test list), and the release
archive check renders a 3D frame on Linux and macOS, on Linux once more with no display: no release step had
rendered 3D on Linux.
2026-11-18 11:59:42 -08:00
shinyobjectz e50c22064f RR3: in progress. A whole video made as shot segments and joined by stream copy, behind RAEA_SEGMENTS=1 until RR3's gates are measured. raea-runtime-segments: a new encoder run (unsigned) at each cut once the segment before holds a second of frames (split.rs), the whole wrapped by the signer so the export is one file with one watermark id, signed once after the join (encode.rs); the join reads the segments' MP4s with re_mp4 (H.264/HEVC to Annex B with their parameter sets ahead of each keyframe, AV1 OBUs as they are) and writes one with muxide, the sound laid under once from the backend's new Backend::sound (AAC on Apple, Opus on soft and av1) (join.rs). Cuts come from each frame of the fed render (an outermost Sequence's data-raea-start, raea-runtime-page shot_starts; the engine's camera cut, raea_sys_frame::shots::Cut set in pre_step) and the timeline's Shots up front. io-codec gains SoundTrack, remux::aac_track and hvcc_params; io-media backend_unsigned and a public sign::wrap. Benches: film.tsx's cut and cut-long compositions, pages.tsx, rr3.sh (segmented against one run: SSIM >= 0.999 and VMAF >= 99 per frame; join under 1 s on 3,600 frames). Tests: two segments joined are one video with one sound and the segments' own bytes; the encoder splits at cuts but not after a short shot 2026-11-17 19:52:34 -08:00
shinyobjectz c5df492df8 LT21: detail for anything raea draws. A part's detail prop (<Model>, <Mesh3d>) is raea-sys-lod's reflected Detail, which each frame becomes Bevy's VisibilityRange on every mesh under the part (a glTF's meshes are its children). It is drawn between near and far metres, or between sizes on screen in px, converted for the shot's camera from its field of view and its target's height, with the part's size taken as its bounds' diagonal. Each edge cross-fades by Bevy's dither over fade of its distance; past the end nothing is drawn, in the view or the shadow passes; shadow: false keeps it out of the shadow maps. Checked on five spheres at minPx 30 (drawn to 133 m, culled at 302 and 617 m), a cube past its far, and four court pumps (far 3 at 5 m gone with its shadow, shadow false drawn without one). RAEA_LOD_DEBUG=1 prints each range and whether Bevy kept it in range of each camera. Mesh now finds its shape inside a fragment: shapeFromChildren and boundsFromChildren read only direct children, so <Mesh3d><><Sphere /><StandardMaterial /></></Mesh3d> was dropped from the scene without a word. Conformance: sdk/raea/conformance/detail.test.tsx. 2026-11-17 19:52:34 -08:00
shinyobjectz c4578438d1 LT2: raea GI's first probe pass on systems/rt (RAEA_GI=1, unset nothing changes): a grid of probes around the camera (RAEA_GI_GRID, RAEA_GI_SPACING), 64 rays a probe through the TLAS, a miss seeing the camera's environment and a hit a flat stand-in lit by the sun through a shadow ray and the sky's diffuse light; each probe's ambient cube kept as a running mean and written into Bevy's irradiance volume. A ray budget a frame (RAEA_GI_RAYS) sets how many probes refresh; a moved grid or changed light starts again with RAEA_GI_WARM rounds; the pass's own GPU timestamps go to RAEA_GI_STATS. raea_sys_rt::passes installs traced AO and GI behind one plugin line. 2026-11-17 19:52:34 -08:00
shinyobjectz f7484f2eb5 LT1: live frame time, flicker against the path-traced shot, light measured on 8x8 blocks, a converged FLOOR3
raea light check now plays each scene live (raea play --offscreen --no-vsync --3d, 6 s at 1080p) and reports its
milliseconds a frame; adds a traced-ao path (raster with systems/rt's traced occlusion); measures distance on 8x8-pixel
block means, so antialiasing and a reference's leftover noise count for little; measures flicker as the second
difference in time of each pixel's error against the same shot path-traced, so motion cancels; keeps a reference only
while it's the same frames at the same samples (made.json); and takes a scene's own sample count. The path tracer's
reset is now one-shot, as Solari's is (vendor/bevy_solari pathtracer/extract.rs, raea: mark): it stayed set, so a cut
under the path tracer restarted accumulation every frame after it. RAEA_LIGHT_SPP restarts each frame's accumulation
(raea-render restart_pathtracer), so a thing moving under a held camera isn't smeared.

LT1 measured on FLOOR3 against a 2048-sample reference: raster 1.38 stops off (worst tile 3.37), 18.0 ms a frame;
Solari 0.96 (2.62), nearly all one bias a stop dark, 47.6 ms a frame. Berlin is the main scene from here; it and the
kitchen get references once their materials and lights are in the traced path. LT1's plan table is in the feature.
2026-11-17 19:52:34 -08:00
shinyobjectz 10a18eb332 raea motion on PyTorch off the Mac, raea setup motion, and shaded meshes that spawn after a load
raea motion runs Kimodo on MLX on a Mac as before; on Linux and Windows it runs upstream Kimodo (commit e1c219c, Kimodo-SOMA-RP-v1, post_processing off) on PyTorch, CUDA when there is an NVIDIA GPU, else the CPU. Python hands back the sampler's raw features and raea's Rust decoder makes the clip, so both write one clip format (systems/kimodo torch.rs, torch/run.py). raea setup motion [--check] fetches or checks the MLX models on a Mac, and elsewhere makes a uv Python 3.11 environment and fetches the weights (Llama 3 from NousResearch's ungated copy, its files checked against Meta's SHA-256s, each repository pinned). Checked on the Mac: MLX unchanged, the torch path's Rust half on MLX's own features (same keys, root gap 1.1e-16 m), cargo check for macOS, Linux and Windows. Not yet run end to end on Linux or Windows (docs/character.feature CH15d says what is and isn't tested).

scene3d's shade_meshes: a mesh row waiting for its shader gets it after a live frame's or a fed render's rows too, not only when a model spawned (a shaded part with no model beside it drew its bare standard surface). docs/first-person.feature: the first-person hands, interactions and cutscenes spec (FP1-FP11).
2026-11-17 19:52:34 -08:00
shinyobjectz 450d873984 Windows: engine/render's canonicalize goes through dunce, the sweep's last
The last of the sweep (57f3ef8db3, e388258bff): engine/render's texture folder uses dunce::canonicalize, which gives C:\... on Windows and is std's own call on the Mac and Linux. It takes engine/render/src/lib.rs off tools/windows-paths.sh's WAITING list, so the check holds at zero with no exception.
2026-11-17 11:19:38 -08:00
shinyobjectz 8443ecf2e7 #159: PrepassRead lives in raea-sys-compose's passes.rs, beside RAEA_PASS's own reading of the prepasses, not in raea-sys-frame, which it took over the 2,000-line crate limit (2,008). raea-sys-post and raea-render already depend on raea-sys-compose; nothing else changes. 2026-11-16 16:32:45 -08:00
shinyobjectz 57e0737edd #159: --aov and RAEA_PASS keep the camera single-sampled on every frame. Both read the camera's prepasses (depth and motion vectors, depth and normals) through single-sampled bindings, so they put Msaa::Off on the camera once, with the prepasses. The camera row's post-processing then put multisampling back: raea-sys-post's sync, on the first frame whose post columns changed (a bloom ramp), restored the Msaa the camera was made with, and msaa_for_3d did it on every frame a live scene (a game) set rows. The prepasses became multisampled and the frame's bind group was refused ("Texture binding 0 expects multisampled = false, but given a view with samples = 4"), at frame 2 of a render with frames 0 and 1 written. A camera whose prepasses a pass reads now carries raea_sys_frame::camera::PrepassRead, put on with the prepasses by --aov (aov_prepasses) and RAEA_PASS (compose's mark). sync and msaa_for_3d leave such a camera's MSAA off, and sync no longer takes off a depth or normal prepass that AO brought when the AO goes. aov_prepasses finds its cameras by PrepassRead, not by the motion-vector prepass, which a motion-blurred camera already had, so that camera was never made single-sampled. The readback refuses a multisampled prepass with a message instead of handing it to the GPU, whose validation error stopped the render. Tests: raea-sys-post's a_camera_whose_prepasses_are_read_stays_single_sampled (before: Sample4 once the bloom changes); bench/aov-msaa/check.sh renders frames 0 to 5 of a bloom ramp and of a game with --aov, and the ramp with RAEA_PASS=depth (before: each refused at frame 2). 2026-11-16 16:32:45 -08:00
shinyobjectz cdebceb9d9 #162: a load with nothing to step has a pure plugin clock: Time (Time<Virtual> too, which the fixed loop copies back) and the keyed rows are the frame drawn's, f / fps, however it was reached. Since #77 skipped the replay, the clock stepped only on the frame after the last stepped: every still sampled globals.time 0, and a batch's second frame drew the first's <Material> uniforms (keyed rows) and component rows. Measured on a face split into globals.time and a uniform from the frame, as seconds: before, lone 60 = 0 / 1.96, batch 30,90 = 0 / 0.97 and 0 / 0.97; after, lone 60 = 2.01 / 2.01, lone 90 = 3.01 / 3.01, batch = 1.00 / 1.00 and 3.01 / 3.01. A stepping clock is unchanged. 2026-11-15 20:33:14 -08:00
shinyobjectz b2f2f2af3d R3F26 (#130): the view a camera on the Engine's target draws moves to a crate of its own, raea-sys-viewbox (TagRowTarget, ViewBox, tag_row_view), with two tests: a box laid out after the first frames takes the camera's view and gives the frame's Viewport back when it goes, and a camera's own Viewport is left as it is. raea-render goes from 2,009 lines to 1,972, back under rask's 2,000 2026-11-15 13:56:56 -08:00
shinyobjectz 3e391e2afa R3F26 (#130), engine: a camera in a page element draws its own view in the element's box (docs/sdk.feature S3a), not the page's cropped to it
engine/render target.rs tag_row_view gave a camera on the Engine's target a w x h Viewport (the frame above the tag row) on the frames before the page had laid its box out, a render's first draws, and skipped any camera with a Viewport after that, so a box's sub view (SubCameraView: the box's size as the full view, offset by its place) never came. The Viewport it gives (`ours`) is now taken off when a box comes, and given back when the box goes; a camera's own Viewport (a ViewportNode's) is left as it was. Viewports are compared by place and size (bevy_camera's Viewport has no PartialEq).

#130's five cases, a 2 x 2 plane at the origin seen from z 5 in a 400 x 400 box: on a 600 x 600 page at fov 90 it is 80 px and centred in the box (was 120 px, centred on the page); at fov 32, 278 px (three: 279; was the whole box); at 1080 x 1920, 80 px in the box (was nothing); at 2160 x 3840 with the box at (800, 1600), 80 px in the box (was the whole box). raea's own camera in a box drew the same way and is fixed with it.
2026-11-15 13:50:51 -08:00
shinyobjectz 53b5da60b3 R3F23c: the engine's load empties its render images before its rows spawn, not after (runtime/plugins apply_rows reset them once the rows were in, so a three:uniforms row naming a render image made a second, blank image under the same name and every ShaderMaterial reading a target read black) 2026-11-15 13:36:44 -08:00
shinyobjectz 840de67569 R3F23: a standard material's map follows the render target an app drew this frame (R3F23c, part). A mesh's map that names render images is keyed frame by frame (runtime/scene parts.rs: maps, map_k by step), and the new crate raea-sys-rendermap's sync_render_maps points the material's base colour texture at the image its row names this frame, so two targets ping-ponged (GPUComputationRenderer, a feedback effect) show the one drawn last. A map naming a picture keeps its first frame's, as before. runtime/scene drops two doc lines left over from moved modules 2026-11-15 13:03:41 -08:00
shinyobjectz f7b1cdad92 R3F23: no new copies. rendercam.rs finds a camera's ambient lights through one ambients() (the first one's colour, the frame's sum); spawn.rs and instance.rs take apart a SceneTarget and an asset event as their own patterns, not closures the dupes ratchet matches elsewhere 2026-11-15 13:03:41 -08:00
shinyobjectz 2598a75942 R3F23: a camera into an image within the crate budgets, and its ambient light shared with the screen camera's. raea-render's spawn_camera takes its size and target together and ends with raea-sys-frame's into_image, which a screen camera's row passes through; image_of gives a rendercam's image as its target, so load and apply_rows spawn camera and rendercam rows in one arm (raea-render stays under 2,000 lines, with is_3d_spawn moved to raea-sys-frame's store). runtime/scene takes rendercam tracks where it hands them to raea-runtime-look. rendercam.rs's ambient_columns is the one place a camera's ambient columns come from (a pass camera now carries the ambient colour too) 2026-11-15 13:03:41 -08:00
shinyobjectz 744c5a2a1f R3F23: a camera drawing into an image, in the engine (R3F23a). A PerspectiveCamera row whose target is "render:NAME:WxH" (":float" for an Rgba16Float image) is a rendercam: raea-runtime-look's rendercam.rs gives it a row of its own (into, on keyed by step, no tone curve, the ambient light of its own layers), the engine spawns it on that image (RenderTarget::Image, no multisampling or dither, Hdr for a float image) before the screen's camera, and a material's map naming the image reads what it drew. raea-sys-frame's render_image.rs parses and makes the image once for every source naming it; a three shader follows only the screen camera's tone mapping; the TSX PerspectiveCamera takes target and layers, and a camera with a target isn't the one the pointer picks through 2026-11-15 13:03:41 -08:00
shinyobjectz fc3bba9b1a R3F20: TintPlugin registered by its path (raea-render stays within its 2,000 lines); tint's colour buffer padded in a loop, not a closure dupes matched 2026-11-15 11:44:00 -08:00
shinyobjectz 5b52eb4aed R3F20: an InstancedMesh is one <Instances>, still or moving, with a colour a copy
raea/3d <Instances>: an Instance takes `color` ("#rrggbb" or linear [r, g, b]), multiplied with the material's as
three's instanceColor; a set with colours packs 12 numbers a copy, data-at {"stride":12,"at":[...]}. runtime/look reads
it as plain numbers (not JSON values) and writes inst at 13 numbers a copy with inst_tint 1. scene3d: a tinted set's
copies share one TintMaterial (raea-sys-material tint.rs, TintPlugin: the standard material extended by a ShaderBuffer
of the copies' linear colours, read by the copy's MeshTag above compose's two pass bits), the buffer rewritten in place
when the frame's list changes, the row's standard material copied into its base when it changes; compose's
sync_passes keeps a tag's high bits. sdk/r3f: scene.ts sends every InstancedMesh with a standard surface as one
<Instances> (instanceMatrix.count copies, those past count shrunk to 1e-5, instanceColor as colours); a ShaderMaterial,
several materials, MeshNormalMaterial, a shadow catcher or clipping keep a mesh a copy. The three.js host draws the
coloured form as instanceColor. Tests: conformance instances (12 numbers a copy), look's a_colour_a_copy, tint's tag
bits, r3f input (moving and coloured copies stay one Instances; a ShaderMaterial is a mesh a copy), the three host's
instanceColor.
2026-11-15 11:40:45 -08:00
shinyobjectz 9f4990cd90 stage: the hold and wireframe are a crate of their own (raea-sys-hold); the stage's new calls share one send 2026-11-13 09:03:44 -08:00
shinyobjectz e60a8bc5fe stage: hold a part, say where it stands, wireframe (docs/scene-feed.feature SF4c, SF4d, SF3e) 2026-11-13 09:03:44 -08:00
shinyobjectz 76a4ef7885 A still no longer prints 54 CommandQueue warnings: the last frame's extract commands are applied before the engine goes (#89 item 7)
Bevy applies the extract schedule's commands in the next frame's render schedule. A still draws one frame and drops
the Engine, so each extract system went with its queue unapplied and bevy_ecs warned "CommandQueue has un-applied
commands being dropped" 54 times (lldb on the warning: the extract systems' FunctionSystemState, dropped with the
render sub-app's schedules from render_with). Engine's Drop now runs the extract schedule's apply_deferred on the
render world, as Bevy's apply_extract_commands does each frame. Checked on the binary: a still of the starter edit
prints no CommandQueue line, and a video renders with 0 findings. forward_render_diagnostics is written shorter to
keep raea-render within 2,000 lines.
2026-11-12 11:40:06 -08:00
shinyobjectz 2b8b43a420 raea check's flashing screen is a crate of its own, raea-app-check-flash, so the check has room for #89's fixes
apps/check was at its 2,000-line limit (tools/size.sh) with three of #89's items still to come. The screen itself
(Px, Swings, FlashScreen: WCAG 2.3.1's opposing swings in a frame's windows, from decoded RGB) is pure pixel maths
with nothing of the check's, so it moves to apps/check/flash with its six tests, unchanged; the FFmpeg side (the
decode, showinfo's exact times, the log's severities, the findings) stays in flash.rs. apps/check goes to 1,680
lines. CI's unit tests take the new crate too. And raea-render's log-filter comment is folded a line shorter: the
merge of #104 left the crate at 2,001.
2026-11-12 10:55:50 -08:00
Mattias HjemgaardandClaude Opus 5.5 ab0babcce7 log: the 3D camera is the shadow LOD origin, and bevy_time's warning is filtered (#104, #89 item 7)
* fix(log): a 3D camera that is the shadow LOD origin, and bevy_time's warning filtered

Every 3D run with a point or spot light warned that no entity has
ShadowLodOrigin (the scene camera draws into an image, so Bevy picked one
arbitrarily): the scene camera now carries the marker. bevy_time's "did not
receive the time from the render world" (raea drives Time by frame, with the
render world in step) is filtered out of stderr, in Bevy's log filter and in
raea_io_trace's logger; the event log keeps every record.

Measured on main 5b2c7731: a 3D still with a point light printed the
ShadowLodOrigin warning, now nothing; a 2D still printed bevy_time's line,
now not. The 54 dropped bevy_ecs CommandQueue lines on a 2D still are left as
they are: their source still needs finding.

Part of #89

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* check: keep raea-render under the size cap

The two new comments said in five lines what fits in three; raea-render
was 2 lines over tools/size.sh's 2,000-line crate limit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-12 13:43:33 -05:00
shinyobjectz 8796ceb67c <Instances> whose placements change over the shot move in a video, as they do in a still (#85). A render drew the first frame's list on every frame of a video or an --at list (the row's inst column held one list and said so only in a warning), while a still of a later frame showed it moved. Now the row keeps every distinct list it shows (inst_all, '|' between lists, each frame's list compared with the frame before's) and keys which one each frame shows (inst_k), as a panel's pictures are; a live frame sends its inst, and the fast live path drops to the full one when an Instances' list isn't the one it sent. raea-runtime-scene3d's sync_instances moves the copies (a mesh's, or each of a model's meshes at its place in the model) when the frame's list is another; a list with another count than the copies is the frame's error, and the rows hold the list before it with a warning. The SDK's at, the guide's meshes.md and the manual's rows say a list that changes moves the copies and costs a list a frame. The issue's 20 sliding spheres at 640x360: x-centroid 141.2 at frame 0 and 326.7 at frame 59 in the video (the fed live path, RAEA_LIVE3D_FAST=0 and RAEA_3D=program alike), 327.0 in a --frame 59 still; was 141.1 at 59. The same with a glTF (knot.glb): 142.9 and 326.8, still 327.1. raea-runtime-look tests: lists keyed frame by frame, still ones one column 2026-11-10 16:46:23 -08:00
shinyobjectz 7d66dfc59c RR2: the camera changes per frame. <Camera3d is_active> (Bevy's Camera field) says which camera draws: each frame's first active camera in the tree is the piece's, the others are dropped from that frame with their depth of field and ambient, and the camera row's shot column steps where another camera takes over (raea-runtime-look active.rs). A frame where it steps is a cut (raea-sys-frame Shots), drawn as a shot rendered alone draws its first frame: motion blur's step before it draws the frame itself rather than the other camera's, with a plugin too, and Solari's and the path tracer's history reset. Play sends the shot on its live camera row (0 again when the first camera is back), and a live engine takes a changed shot as a cut (Moved). The step to f - 1 that motion blur needs never ran on any engine, because the Engine's reads count as a Bevy plugin; renders were right anyway (export draws f - 1 before f), and play blurred cuts from the other camera's frame. bench/rerender/rr2.sh on cams.tsx (cameras A, B, A with parts moving): without motion blur the piece equals its three shot compositions 120/120; with it the frames before the first cut and both cut frames are identical and the rest differ by the blur's grain alone (seeded by the frame number, SSIM >= 0.999439; one camera moved instead: 0.810 and 0.785 at the cuts); each shot of the piece rendered alone with --at is identical 120/120; play's 7 held seeks onto and across the cuts equal the render. The craft guide's rule 6 and limits.md say how to cut between cameras 2026-11-10 15:40:43 -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
shinyobjectz 281da9cc10 An ImagePlane plays its sprite sheet and swaps its picture in an mp4 render: a video's 3D is drawn live, frame by frame, and a live frame sent a panel only its placement, visibility and screen values, so the cell frame showed, the src it showed and its sheet's grid stayed at frame 0's for the whole film (a folder of PNGs, made from a program, played them). A live frame now sends a panel's sheet_frame, sheet_cols, sheet_rows and src when they change (live.rs's columns, and the fast path, which leaves a panel whose src changed to the full path: it holds the raw src against the one it last made a row from, so an unchanged one costs nothing); the engine swaps a live panel's picture when its row's src names another (scene3d::Pictures' live, found as spawn finds it). A program keys a part's grid as it keys its cell (it was the first frame's), so a src that changes to a sheet of another grid shows that sheet's cells; a card whose height follows its picture takes the new picture's shape. Found making 0.1.1's app showreel, which worked around it by rendering frames. 2 tests: raea-runtime-look's sheet keys, and raea-runtime-live's live_sheet (raea-runtime-scene is at its 2,000-line limit), where RAEA_LIVE3D_CHECK holds the fast path against the full one; a 30-frame repro reads the right cell and grid at frame 20 in the mp4, the program render and the PNGs. 2026-11-10 03:42:36 -08:00
shinyobjectz fa78ed3bc4 raea play no longer hangs at start-up on Windows: pipelines compile on the render thread as each frame queues them, as Bevy always compiles them on macOS. On Bevy's task pool (its asynchronous compilation, Windows and Linux only) the first frame's wait_pipelines waited on pipelines the pool left unstarted with its threads idle. With the v0.1.0 zip on an RTX 4070, 17 of 32 opens stalled 2.8-42.6 s and some never finished; on lavapipe at 4 cores, as the release run checks it, kept-unmount hung past 200 s, the stall that timed out v0.1.0's Windows live-play check and kept Windows out of the release. Compiled on the render thread, the same binary opened 32 of 32 in 0.49-0.70 s on the 4070 and passed 26 of 26 plays on lavapipe, and a build with this change passes all 13 live-play cases on both. RAEA_BEVY_ASYNC_PIPELINES=1 brings the task pool back. Why the pool leaves its tasks queued isn't known yet. 2026-11-09 23:22:38 -08:00
shinyobjectz aa0a416b73 A GPU error is the render's error (#66): raea's engine answers Bevy's render errors itself (gpu_error), putting the first one, with what the GPU said, where a frame's other errors go, so raea render refuses with it. Bevy's own handler asks the app to quit, which an engine that steps its app never reads: the frame came back half drawn and was saved with APPLIED and exit 0 (on DX12 the blocks example drew its floor and one box; on an AMD iGPU's Vulkan, OutOfMemory left the background only). Drawing stops as before; it's said once, since Bevy asks again every update and a live game prints each one. A unit test gives it an FXC error twice 2026-11-09 21:34:45 -08:00
shinyobjectz afb3eb6dc6 PV1: the live stage picks 3D parts, a free camera, and props set as it plays
stage.pick answers what is under a point of the stage, the page and its 3D as one picture: a 3D part (its layer key,
name, JSX props, box, the point hit and its distance; the nearest mesh along the pointer's ray, skinned meshes as
posed: systems/frame pick.rs) or the page's element, with the part behind it. stage.view draws the 3D from an orbit
until it is given back (systems/frame view.rs, FreeView). stage.props sets a composition's props over its defaults
as it plays (the entry's raea-props). What the stage opens is stamped, so every pick has its place in the code.
stage.seek (written 11-07 for the editor's Live, never committed) lands with it. raea media still takes --width.
Proof: raea play shapes.tsx --offscreen --seek 10 --pick 640,330 answers shape-2 at shapes.tsx:28:11#2 with its
props; --view 1.2,0.9,9 draws it from above. docs/preview.feature is the plan.
2026-11-09 21:03:59 -08:00
shinyobjectz e029385319 Layer pass, the 3D's half (docs/review.feature R2b, R2e; work in progress, parked with the source stamps): each Engine::draw records its frame's meshes with --layers (systems/frame layer.rs record: every shown Mesh3d from the lowest-order active Camera3d drawn on the CPU straight at mask size, nearest first, as the layer of the nearest part up with a LayerKey; skinned meshes posed by their joints; no morph targets), and the file's mask is the page's where it painted and the 3D's elsewhere (raster.rs, Recorder::frame_3d). Names: a use's outermost element is named after its component (Badge), an unnamed part after its tag (Mesh3d), else aria-label, class, tag. RAEA_LAYERS=1 turns it on too, until --layers is in the help with its manual entry. bench/layers: a third mesh in front of the moving cube, written before it; mutants.sh breaks the pass four ways (keys swapped, the 3D 2 px right, the farthest triangle winning, the page under the 3D): each fails compare.sh while the pass passes all 15 layers at IoU >= 0.969. 2026-11-09 12:48:31 -08:00
shinyobjectz 4b8157f98c A still of a 3D composition no plugin carries state for draws only its own frame, not every frame before it (#77). Every engine installs the plugin clock (some plugin is always registered), so catch_up rendered each frame before a still in full: render graph, shadow views and submit, about 90 ms a frame in a film, and --at 2448 took 226 s. The engine now steps through those frames only when the rows hold something a plugin carries from frame to frame (raea_runtime_plugins::steps): a component or resource of a type from outside Bevy's own scene and render crates and raea's (a rigid body, a particle effect, Bevy's animation, time or states; a short type name, which could be anyone's), a driven mesh, or a row kind not known to be frame-pure. Keyed component rows land on their frame however it is reached. The film's --at 2448: 226 s -> 20 s, pixel-identical; a physics still at frame 100 (avian) still steps all 100 frames. bench/at-cost checks that a frame-pure still steps none. 2026-11-09 11:18:41 -08:00
shinyobjectz b301c65570 Ray tracing: see-through materials, uv_transform and a panorama's sun under Solari and the path tracer
bevy_solari 0.20 is vendored (vendor/bevy_solari, changes marked "raea:"). Each TLAS instance now carries a mask, so a
ray finds the nearest opaque hit and then walks the see-through instances up to it: Mask materials stop it by their
cutoff, Blend by the chance of their alpha, Premultiplied by that plus their clear coat's Fresnel share (the path
tracer shades the coat alone, weighted back), and Add never. Before, every traced mesh was opaque, so a transparent
skin turned what it covered black. StandardMaterial's uv_transform now applies to traced texture reads.

<Environment> finds a panorama's sun when it loads (systems/environment sun.rs), using the panorama's own floats, and
Solari samples that sun as a directional light. Inside the sun's disk the environment map shows the sky around it, so
its light isn't counted twice; camera rays and mirror bounces still see the panorama's sun. The path tracer bends a
normal-mapped normal that faces away from a grazing ray, which removes the black streaks toward the horizon of a bumpy
plane.
2026-11-08 21:26:44 -08:00
shinyobjectz 2c5b71fef8 Every 2D primitive and ring in Mesh2d, 2D drawn with Bevy's MSAA and exact colours; Bevy parity for 2d/2d_shapes
Mesh2d takes all of bevy_math's 2D primitives (CircularSector, CircularSegment, Annulus, Capsule2d, Rhombus,
Triangle2d, Segment2d, Polyline2d, ConvexPolygon beside Circle, Rectangle, Ellipse and RegularPolygon), each with its
reflected fields, and any of them as Bevy's Ring: `ring={thickness}` (to_ring) or `inner={...}`. A Shape2D row
carries the spec as `primitive` and raea-sys-mesh's primitive_mesh builds it, as Bevy's mesher does.

Two fidelity gaps 2d_shapes exposed, fixed for every 2D part:
- A Mesh2d's ColorMaterial colour reached the GPU rounded to a hex. It now goes as the Srgba's floats (`srgb`).
- 2D drew single-sampled, where Bevy's Camera2d defaults to 4x MSAA, so edges between pixels snapped. An edit with
  2D mesh rows now gets MSAA (raea_sys_sprite::has_2d, beside has_3d at the two MSAA call sites only, not the
  encoder's), and the 2D camera keeps to the 3D camera's MSAA every frame, sharing its main texture. The frame tag's
  Camera2d on the same target keeps to it too: Bevy makes one 2D depth texture per target, so differing sample
  counts were a validation error.

A relative import of a file under raea's sdk/ that isn't an SDK package's source (a bench's shared helper) is now
copied into the bundle like any outside import; before, everything under sdk/ was assumed to come by name.

New bench helper sdk/raea/bench/bevy-parity/helpers/theme.ts: examples/helpers' basic_example_theme, option checkbox
and bottom-left column, used by 14 Bevy examples.

2d_shapes passes at 0.99987: the shapes area matches with 0 pixels off by more than 2%; the rest is the checkbox
captions' glyph edges (the known text item). Every port was rerun after the MSAA change: 152 of 152 pass.

skills/ pins raea-skills 004b866 (#8), whose generated sdk.md lists the new primitives.
2026-11-08 20:57:45 -05:00
shinyobjectz 4175c116fb MeshPass with depth and vertex colours, Mesh3d material={false}; Bevy parity for shader_advanced/specialized_mesh_pipeline, exact
Bevy's specialized_mesh_pipeline draws meshes that have no material by a SpecializedMeshPipeline of its own: positions
at location 0 (compressed or not), colours at 1 under VERTEX_COLORS when the mesh has them, depth tested and written
GreaterEqual, under the view's MSAA. raea's <MeshPass> now does all of it:
- `depth`: it tests and writes the view's depth as an opaque mesh does. The pass always attaches the view's depth (a
  pipeline's depth state must match the pass), so without `depth` it compares Always and writes nothing, as before.
- a mesh's colours go to location 1 under VERTEX_COLORS, as Bevy's own specialize does.
- the pipeline takes the view's MSAA sample count (it assumed 1, so it only worked with Msaa off).
And <Mesh3d material={false}> (any <Mesh>) gets no material at all, as a Bevy Mesh3d without a MeshMaterial3d, so
only its own pass draws it: row no_material, spawned beside the toon branch (engine/render line-neutral).

Parity: SSIM 1.000000, worst tile 0, batch keys 0 / 0 at frames 5 and 10. Without material={false} the pixels were
already exact, but raea drew 2 batch keys of default material Bevy doesn't. Mutants: without the vertex colours it
fails (0.961897, tile 147); without `depth` it is unchanged, since the rectangle is behind the triangles and the pass
draws far to near. custom_render_phase, custom_phase_item, custom_shader_instancing, 3d_scene and mesh2d still pass.
150 ported, 150 passing.
2026-11-08 16:42:57 -08:00
shinyobjectz 4103559dac FC2d: a mesh drawn again in a phase of its own, and compressed meshes; shader_advanced/custom_render_phase passes
<MeshPass shader> inside a mesh draws it again by your shader file as written, in a sorted phase after the camera's
main opaque pass, onto the colour target with no depth attachment and back faces culled, with Bevy's mesh view and
mesh bind groups: raea-sys-phase's MeshPass, Bevy's custom_render_phase stencil phase made a component. A mesh's
`compressed` prop compresses its geometry as Bevy's compressed_mesh(&MeshCompressionArgs::regular()) does
(raea-sys-mesh finished), so a shader reads its positions under VERTEX_POSITIONS_COMPRESSED; engine/render's mesh
build calls it in the same line, keyed on it.

The port is pixel-identical to Bevy at frames 5 and 10 (0 pixels differ). A 1 to 3 cm move of the sphere, camera or
cube still passes the SSIM bar but is 177 to 629 pixels off, so the exact match is the port's, not the bar's. The parity
host gets indexmap and nonmax, the example's own dependencies. 144 of 438 ported, 144 passing.
2026-11-08 13:28:22 -08:00
shinyobjectz ae61cbb3e6 A mesh carries its own vertex attributes, and a Material reads the ones it names (shader_advanced/custom_vertex_attribute)
Bevy's custom_vertex_attribute gives a cube a BlendColor attribute and lays out the material's vertex buffer as
[POSITION at 0, BLEND_COLOR at 1] in its specialize. raea now does both:

- sdk/render: MeshVertexAttribute.new(name, id, format) and Mesh's ATTRIBUTE_* constants; Mesh3d `attributes`
  ([[attribute, values]], a value a vertex); Material `vertex_attributes` ([[attribute, location]]).
- runtime/scene: the mesh row carries `attributes` from the first frame.
- raea-sys-mesh attribute.rs: with_attributes inserts them into the mesh (names interned once, as Bevy's are
  &'static str); engine/render's shared mesh keys on them, line-neutral.
- raea-sys-shader own.rs: the layout is part of the pipeline key, and swap sets the vertex buffer to
  layout.0.get_layout of the named attributes, as Bevy's specialize does.

Parity: frames 5 and 10 at ssim 1.000000, 0 pixels off. Mutants: a green BlendColor, BlendColor at location 0 and
four blue vertices fail the bar. Moving the cube 0.1 up and halving the uniform's red pass the bar but the probe
counts 6,067 and 36,685 pixels off (the known SSIM blind spot; the real port is 0).

skills/ pins raea-skills 5218644 (#7), whose generated sdk.md lists the new names.
2026-11-08 15:20:15 -05:00