Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.
TypeScript 3dagent-skillsai-agentsai-videobevyclaude-codegame-enginegpulinuxmacosmotion-designmotion-graphicsreactrusttypescriptvideo-editingvideo-renderingwgpuwindows
SG9: a part a scene leaves leaves Solari's traced scene, so a film rendered whole matches each frame alone
shinyobjectz7e2df514de80
diff --git a/docs/manual/reference/sdk/light.md b/docs/manual/reference/sdk/light.mdindex 775cbead..319ae31a 100644--- a/docs/manual/reference/sdk/light.md+++ b/docs/manual/reference/sdk/light.md@@ -219,7 +219,7 @@ raster-lit: Bevy 0.20's Solari can't trace it, unless `dynamic` gives a skinned| `jitter` | `"denoiser" \| "scaler" \| "both" \| "flip" \| "none"` | which of MetalFX's passes is told the camera's jitter: "denoiser", "scaler", "both", "flip" (the denoiser, negated), "none" (and the view isn't jittered). For A/Bs of RT9; default "denoiser"; RAEA_SOLARI_JITTER ("" the denoiser, "0" none) overrides it || `emissiveSharpness` | `number` | how fast a sample's weight falls with its distance from a pixel's centre in the emission's history, exp(-k d²) in output pixels: lower is softer. Default 6; RAEA_EMIT_TAA_SHARP overrides it || `jitterFrames` | `number` | the jitter's cycle at the full size, in frames: a view drawn at s of its size a side cycles through jitterFrames / s² offsets, and an emissive twig glimpsed through it may stay away that long. Default 8 (DLSS's) |-| `dynamic` | `boolean` | the traced scene follows what moves (a trial, false by default): a skinned character's traced twin is posed each frame, so it casts traced shadows and bounces light, and a hidden part leaves the traced scene. Decided as each mesh is first traced, so set it from the first frame |+| `dynamic` | `boolean` | the traced scene follows what moves (a trial, false by default): a skinned character's traced twin is posed each frame, so it casts traced shadows and bounces light. Decided as each mesh is first traced, so set it from the first frame. (A hidden part, or one a frame leaves out, leaves the traced scene with or without it.) || `constants` | `{ /** how far ReSTIR looks for a neighbour's light samples, pixels (30): smaller keeps …` | constants in Solari's and the denoiser's shaders, compiled in when the scene loads (a value changed later in the composition isn't drawn); each left out keeps the shader's own, given in brackets. <ShaderConstants> reaches the rest |### `SpotLight`diff --git a/docs/stage-guards.feature b/docs/stage-guards.featureindex b1aa13fb..6476ce67 100644--- a/docs/stage-guards.feature+++ b/docs/stage-guards.feature@@ -413,7 +413,23 @@ Feature: Stage guards: a 3D render an agent can't break# Stay rendered whole (11-22, the release build of the 0.1.9 stack): 12 frame-pure errors from frame 230 on, each# a shot after the black open drawn far darker than the same frame rendered alone (the pool, the canyon, the# montage, the paint, the sea), the fault Stay's own code works round by rendering a shot a process- # (tools/film.sh). Its 35 chunks on that route: 0 errors. Left: why a whole render's later shots lose their light.+ # (tools/film.sh). Its 35 chunks on that route: 0 errors.+ # Status 11-22 (branch stage-guards-22): why. A part a scene leaves is hidden, not despawned (its row stays, from+ # the first frame the render holds to its last), and Solari traced hidden parts unless <SolariLighting dynamic>, a+ # trial, was on (raea-render-raytrace solari.rs `hidden` ran only under it). So every place's parts, the ones a+ # film had left and the ones still to come, stayed in the traced scene unseen and shaded whatever was on screen.+ # A render's rows are every part any of its frames has; a frame rendered alone holds only its own, so it had+ # none of them. kept-scenes.tsx (a black open, a yard, a room): on 0.1.9 the yard at frame 30 0.923 SSIM to the+ # frame alone (the room's parts, hidden, shading it), the room at 60 and 89 0.933 (2,478 pixels past the bar);+ # kept-light.tsx solari-gone (a box unmounted at 15) left its shade on the floor 44 frames on (0.987). Every single+ # change of a light or the look follows the frame (SSIM 1.0, and 0.9975 under Solari, its noise). Fix: `hidden`+ # runs on every traced render, on the parts whose visibility changed or that were just traced; kept-scenes+ # 0.996-0.997, solari-gone 0.997-0.998 (measured on 0.1.9 with RAEA_SOLARI_DYNAMIC=1, which ran the same system).+ # And a reset (a cut) now empties Solari's world cache whole, as a render's first frame finds it: it reset only+ # the cells it picked to update that frame, the rest keeping the last place's light at that place's exposure+ # (an exposure cut 0.992 to its still 25 frames on, 0.996 with it). tools/frame-pure-3d.sh holds both repros,+ # each composition a repro names at the bar it names (Solari's 0.99), and L1 runs it on Solari's and the traced+ # scene's code too.Given the plan| crate | file | lines | job || raea-app-direction | apps/direction/src/pure.rs | 234 | the sample, the stills and the alone frame, the patch, the parts under it, the findings |diff --git a/engine/render/raytrace/src/lib.rs b/engine/render/raytrace/src/lib.rsindex 97ca9e19..a4fdb9fe 100644--- a/engine/render/raytrace/src/lib.rs+++ b/engine/render/raytrace/src/lib.rs@@ -71,8 +71,8 @@ pub struct SolariSettings {/// the jitter's cycle at the full size, in frames: a view drawn at s of its size a side cycles through/// `jitter_frames / s²` offsets (DLSS's 8), and emit_taa lets a twig glimpsed through it stay away that longpub jitter_frames: f32,- /// the traced scene follows what moves: a skinned mesh's traced twin posed each frame, a hidden part taken out- /// (RT5, a trial; RAEA_SOLARI_DYNAMIC)+ /// the traced scene follows what moves: a skinned mesh's traced twin posed each frame (RT5, a trial;+ /// RAEA_SOLARI_DYNAMIC). A hidden part leaves the traced scene with or without it (SG9)pub dynamic: bool,}diff --git a/engine/render/raytrace/src/solari.rs b/engine/render/raytrace/src/solari.rsindex 45f8b4fa..38a523f2 100644--- a/engine/render/raytrace/src/solari.rs+++ b/engine/render/raytrace/src/solari.rs@@ -21,22 +21,20 @@ pub fn add(app: &mut App) {.add_systems(PostUpdate, (cameras, meshes, deferred, shadow_maps).before(bevy::camera::CameraUpdateSystems)).add_systems(PostUpdate, dynamic.before(meshes));// a twin posed after its joints are placed and before this frame's asset events go out, so the traced scene gets- // the pose with the frame that draws it; a part's visibility read once it is propagated+ // the pose with the frame that draws itapp.add_systems(PostUpdate,- (- skin_twins.after(bevy::transform::TransformSystems::Propagate).before(bevy::asset::AssetEventSystems),- hidden.after(bevy::camera::visibility::VisibilitySystems::VisibilityPropagate),- )- .run_if(|d: Res<Dynamic>| d.0),+ skin_twins.after(bevy::transform::TransformSystems::Propagate).before(bevy::asset::AssetEventSystems).run_if(|d: Res<Dynamic>| d.0),);+ // a part's visibility read once it is propagated, on every traced render (it was RT5's trial alone: SG9)+ app.add_systems(PostUpdate, hidden.after(bevy::camera::visibility::VisibilitySystems::VisibilityPropagate));}/// Whether the traced scene follows what moves (RT5, a trial: <SolariLighting dynamic>, or RAEA_SOLARI_DYNAMIC on every/// camera; off, everything is as before): a skinned mesh gets a traced twin, posed on the CPU each frame as the GPU-/// skins the drawn one (it casts traced shadows, stops and bounces light), and a hidden part leaves the traced scene-/// until it is shown again (hidden, it still shadowed). On while any traced camera asks for it; a mesh is decided the-/// first frame it is traced, so ask from the first frame.+/// skins the drawn one (it casts traced shadows, stops and bounces light). (A hidden part leaving the traced scene was+/// part of this trial until SG9; it is on for every traced render now: `hidden`.) On while any traced camera asks for+/// it; a mesh is decided the first frame it is traced, so ask from the first frame.#[derive(Resource, Default)]struct Dynamic(bool);@@ -144,10 +142,14 @@ struct Untraced(Handle<Mesh>);/// Solari traces every RaytracingMesh3d, shown or not: a hidden part (one a frame leaves out, a `visible={false}`)/// kept shadowing and bouncing light where it last stood. Hidden, it gives its traced mesh up; shown, it has it back.+/// A part a scene leaves is hidden, not despawned (its row stays), so until 0.1.10 (SG9) every part a film had left+/// stayed in the traced scene unseen: a whole render's later places drew in the shade of all the earlier ones' parts+/// (Stay, far darker than each shot rendered alone; kept-scenes.tsx, the room 0.943 SSIM to its still, 0.997 after).+/// Only a part whose visibility changed, or just traced, is looked at.fn hidden(mut cmd: Commands,- shown: Query<(Entity, &InheritedVisibility, &RaytracingMesh3d)>,- parked: Query<(Entity, &InheritedVisibility, &Untraced), Without<RaytracingMesh3d>>,+ shown: Query<(Entity, &InheritedVisibility, &RaytracingMesh3d), Or<(Changed<InheritedVisibility>, Added<RaytracingMesh3d>)>>,+ parked: Query<(Entity, &InheritedVisibility, &Untraced), (Without<RaytracingMesh3d>, Or<(Changed<InheritedVisibility>, Added<Untraced>)>)>,) {for (e, v, rt) in &shown {if !v.get() {diff --git a/engine/render/tests/diag/kept-light.tsx b/engine/render/tests/diag/kept-light.tsxnew file mode 100644index 00000000..6da58913--- /dev/null+++ b/engine/render/tests/diag/kept-light.tsx@@ -0,0 +1,55 @@+// Diagnosis, part 4 (docs/stage-guards.feature SG9, 11-22): which of a scene's lights and its look follow the frame in one+// render process. Stay rendered whole drew every shot after its first far darker than the same frame rendered alone; its+// own render script says "an engine render keeps its first frame's sun, textures and glows". Each composition here+// changes one thing at frame 15 and holds it: the tone curve's exposure, the sun's strength, the sun's colour, the+// ambient light, a point light's colour and strength, and a box's glow. All follow the frame (0.1.9: SSIM 1.0). The+// solari-* half does the same under Solari, reset at the change as a cut is, with "none" as its control (0.9975: two+// Solari renders of one frame differ by their noise): only "gone", the box unmounted at frame 15, kept anything. A part+// a frame leaves out is hidden, and Solari traced hidden parts, so its shade stayed on the floor 44 frames on (0.987;+// 0.998 once hidden parts left the traced scene: kept-scenes.tsx has the whole-film shape).+// frame-pure: compositions exposure sun-lux solari-gone+// frame-pure: bar 0.99 solari-gone+import React from "react";+import { AbsoluteFill, Composition, registerRoot, useCurrentFrame } from "raea";+import { Canvas3D, ToneMapping } from "raea/3d";+import { Cuboid, Mesh3d, Plane3d } from "raea/mesh";+import { StandardMaterial } from "raea/pbr";+import { Srgba } from "raea/color";+import { Camera3d } from "raea/camera";+import { Transform } from "raea/transform";+import { AmbientLight, DirectionalLight, PointLight, SolariLighting } from "raea/light";++type Change = "none" | "exposure" | "sun-lux" | "sun-colour" | "ambient" | "point" | "glow" | "camera" | "parts" | "gone";++function Scene({ change, solari = false }: { change: Change; solari?: boolean }) {+ const f = useCurrentFrame(), late = f >= 15;+ const is = (c: Change) => late && change === c;+ return (+ <AbsoluteFill style={{ background: "#000" }}>+ <Canvas3D>+ <Camera3d transform={is("camera") ? Transform.fromXyz(-2, 1.6, 4).lookingAt([0, 0.4, 0]) : Transform.fromXyz(0, 2.2, 6).lookingAt([0, 0.4, 0])}>+ {solari && <SolariLighting bounces={2} reset={f === 0 || f === 15} />}+ </Camera3d>+ <ToneMapping mode="agx" exposure={is("exposure") ? -3 : 0} />+ <AmbientLight brightness={is("ambient") ? 2000 : 80} />+ <DirectionalLight name="sun" illuminance={is("sun-lux") ? 20000 : 2000} color={is("sun-colour") ? "#4080ff" : "#ffd2a8"} shadow_maps_enabled transform={Transform.fromXyz(3, 6, 4).lookingAt([0, 0, 0])} />+ <PointLight name="lamp" intensity={is("point") ? 400000 : 20000} color={is("point") ? "#40ff60" : "#ffffff"} transform={Transform.fromXyz(-1.6, 1.4, 1)} />+ <Mesh3d name="floor"><Plane3d half_size={[6, 6]} /><StandardMaterial base_color={Srgba.hex("#b8b0a4")} /></Mesh3d>+ {is("parts") && <Mesh3d name="wall" transform={Transform.fromXyz(0, 1.2, -1.5)}><Cuboid half_size={[3, 1.2, 0.05]} /><StandardMaterial base_color={Srgba.hex("#e0d8cc")} /></Mesh3d>}+ {!is("gone") && <Mesh3d name="box" transform={Transform.fromXyz(0.9, 0.6, 0)}><Cuboid half_size={[0.6, 0.6, 0.6]} /><StandardMaterial base_color={Srgba.hex("#c84a2e")} /></Mesh3d>}+ <Mesh3d name="glow" transform={Transform.fromXyz(-1, 0.4, 0.4)}><Cuboid half_size={[0.4, 0.4, 0.4]} /><StandardMaterial base_color={Srgba.hex("#202020")} emissive={is("glow") ? [8, 6, 1, 1] : [0, 0, 0, 1]} /></Mesh3d>+ </Canvas3D>+ </AbsoluteFill>+ );+}++const CHANGES: Change[] = ["exposure", "sun-lux", "sun-colour", "ambient", "point", "glow"];+// the same under Solari, reset on the change as a cut would be, with "none" as the control, the camera, a new part, and+// "gone": the box unmounted at frame 15+const SOLARI: Change[] = ["none", "exposure", "sun-lux", "camera", "parts", "glow", "gone"];+registerRoot(() => (+ <>+ {CHANGES.map((c) => <Composition key={c} id={c} component={() => <Scene change={c} />} width={480} height={270} fps={30} durationInFrames={30} />)}+ {SOLARI.map((c) => <Composition key={`solari-${c}`} id={`solari-${c}`} component={() => <Scene change={c} solari />} width={480} height={270} fps={30} durationInFrames={60} />)}+ </>+));diff --git a/engine/render/tests/diag/kept-scenes.tsx b/engine/render/tests/diag/kept-scenes.tsxnew file mode 100644index 00000000..466e62d5--- /dev/null+++ b/engine/render/tests/diag/kept-scenes.tsx@@ -0,0 +1,69 @@+// Diagnosis, part 5 (docs/stage-guards.feature SG9, 11-22): a film that changes place, rendered whole under Solari.+// Stay opened on black, then cut between places, each with its own sun, exposure and parts, Solari reset on each cut;+// its later shots drew far darker in one render than alone. Every single change of a light or a look followed the frame+// (kept-light.tsx), and so did a place alone ("room-only", the control). The cause: a part a scene leaves is hidden,+// not despawned, and Solari traced hidden parts unless <SolariLighting dynamic>, a trial, was on, so the yard's floor+// and box stayed in the traced scene through the room, unseen, shading it (the room at frame 60: SSIM 0.943 to the+// frame alone, luma 140 against 146; 0.997 once hidden parts left the traced scene). "solari" is Stay's shape: a black+// open, a yard, then a room; "plain" is the same with no Solari. (A point light changes nothing here: Solari traces only+// the sun and glowing parts.)+// frame-pure: compositions solari room-only+// frame-pure: bar 0.99+import React from "react";+import { AbsoluteFill, Composition, registerRoot, useCurrentFrame } from "raea";+import { Canvas3D, ToneMapping } from "raea/3d";+import { Cuboid, Mesh3d, Plane3d, Sphere } from "raea/mesh";+import { StandardMaterial } from "raea/pbr";+import { Srgba } from "raea/color";+import { Camera3d } from "raea/camera";+import { Transform } from "raea/transform";+import { DirectionalLight, SolariLighting } from "raea/light";++const A = 15, B = 45;++function Yard() {+ return (+ <>+ <Mesh3d name="yard-floor"><Plane3d half_size={[8, 8]} /><StandardMaterial base_color={Srgba.hex("#9fb07a")} /></Mesh3d>+ <Mesh3d name="yard-box" transform={Transform.fromXyz(0.4, 0.6, 0)}><Cuboid half_size={[0.6, 0.6, 0.6]} /><StandardMaterial base_color={Srgba.hex("#d8d0c0")} /></Mesh3d>+ <Mesh3d name="yard-post" transform={Transform.fromXyz(-0.9, 0.8, -0.4)}><Cuboid half_size={[0.2, 0.8, 0.2]} /><StandardMaterial base_color={Srgba.hex("#7a5a3a")} /></Mesh3d>+ </>+ );+}++function Room() {+ return (+ <>+ <Mesh3d name="room-floor"><Plane3d half_size={[3, 3]} /><StandardMaterial base_color={Srgba.hex("#b8a890")} /></Mesh3d>+ <Mesh3d name="room-back" transform={Transform.fromXyz(0, 1.5, -2)}><Cuboid half_size={[3, 1.5, 0.05]} /><StandardMaterial base_color={Srgba.hex("#e0d8cc")} /></Mesh3d>+ <Mesh3d name="room-ball" transform={Transform.fromXyz(-0.6, 0.5, 0)}><Sphere radius={0.5} /><StandardMaterial base_color={Srgba.hex("#c84a2e")} /></Mesh3d>+ </>+ );+}++function Film({ solari, only = false }: { solari: boolean; only?: boolean }) {+ const f = useCurrentFrame();+ const room = only || f >= B;+ const cut = only ? f === 0 : f === A || f === B;+ if (!only && f < A) return <AbsoluteFill style={{ background: "#000" }} />;+ return (+ <AbsoluteFill style={{ background: "#000" }}>+ <Canvas3D>+ <Camera3d transform={room ? Transform.fromXyz(0, 1.4, 3.2).lookingAt([0, 0.6, 0]) : Transform.fromXyz(0, 1.5, 3).lookingAt([0, 0.5, 0])}>+ {solari && <SolariLighting bounces={2} reset={cut} />}+ </Camera3d>+ <ToneMapping mode="agx" exposure={room ? 1 : -2} />+ <DirectionalLight name="sun" illuminance={room ? 2000 : 20000} color="#ffd2a8" shadow_maps_enabled transform={Transform.fromXyz(3, 6, 4).lookingAt([0, 0, 0])} />+ {room ? <Room /> : <Yard />}+ </Canvas3D>+ </AbsoluteFill>+ );+}++registerRoot(() => (+ <>+ <Composition id="solari" component={() => <Film solari />} width={480} height={270} fps={30} durationInFrames={90} />+ <Composition id="plain" component={() => <Film solari={false} />} width={480} height={270} fps={30} durationInFrames={90} />+ <Composition id="room-only" component={() => <Film solari only />} width={480} height={270} fps={30} durationInFrames={90} />+ </>+));diff --git a/sdk/render/src/bevy3d/raytracing.tsx b/sdk/render/src/bevy3d/raytracing.tsxindex 42bdf9cd..5d0c5cf4 100644--- a/sdk/render/src/bevy3d/raytracing.tsx+++ b/sdk/render/src/bevy3d/raytracing.tsx@@ -73,8 +73,8 @@ export interface SolariLightingProps {* jitterFrames / s² offsets, and an emissive twig glimpsed through it may stay away that long. Default 8 (DLSS's) */jitterFrames?: number;/** the traced scene follows what moves (a trial, false by default): a skinned character's traced twin is posed each- * frame, so it casts traced shadows and bounces light, and a hidden part leaves the traced scene. Decided as each- * mesh is first traced, so set it from the first frame */+ * frame, so it casts traced shadows and bounces light. Decided as each mesh is first traced, so set it from the first+ * frame. (A hidden part, or one a frame leaves out, leaves the traced scene with or without it.) */dynamic?: boolean;/** constants in Solari's and the denoiser's shaders, compiled in when the scene loads (a value changed later in the* composition isn't drawn); each left out keeps the shader's own, given in brackets. <ShaderConstants> reaches thediff --git a/tools/frame-pure-3d.sh b/tools/frame-pure-3d.shindex a4bc2931..aaea1d67 100755--- a/tools/frame-pure-3d.sh+++ b/tools/frame-pure-3d.sh@@ -8,7 +8,8 @@set -uo pipefailROOT=$(cd "$(dirname "$0")/.." && pwd)R=${RAEA_BIN:-$ROOT/target/release/raea}-BAR=${FRAME_PURE_BAR:-0.999}+BAR0=${FRAME_PURE_BAR:-0.999}+BAR=$BAR0PX=${FRAME_PURE_PX:-16}[ -x "$R" ] || { echo "frame-pure-3d: no raea at $R (cargo build --release -p raea-cli)" >&2; exit 2; }command -v ffmpeg >/dev/null || { echo "frame-pure-3d: needs ffmpeg on PATH" >&2; exit 2; }@@ -35,6 +36,7 @@ differ() {}for t in "$@"; don=$(basename "$t" .tsx)+ BAR=$BAR0# a repro with a "cold" and a "warm" composition (the glyph atlas, SG3): what a cold atlas draws must match a warm oneif grep -q 'id="cold"' "$t" && grep -q 'id="warm"' "$t"; thenfor c in cold warm; do@@ -48,22 +50,33 @@ for t in "$@"; doficontinuefi- len=$(grep -oE 'durationInFrames=\{[0-9]+\}' "$t" | head -1 | grep -oE '[0-9]+')- [ "${len:-1}" -gt 1 ] || continue- if ! "$R" render "$t" -o "$W/$n/" >"$W/$n.log" 2>&1; then- echo "frame-pure-3d: $n: the sequence didn't render:"; tail -5 "$W/$n.log"; fail=1; continue- fi- for f in 0 $((len / 3)) $((2 * len / 3)) $((len - 1)); do- if ! "$R" render "$t" --frame "$f" -o "$W/$n-alone-$f.png" >"$W/$n-$f.log" 2>&1; then- echo "frame-pure-3d: $n: frame $f alone didn't render:"; tail -3 "$W/$n-$f.log"; fail=1; continue- fi- seq=$(printf '%s/%s/frame-%05d.png' "$W" "$n" "$f")- if m=$(differ "$seq" "$W/$n-alone-$f.png"); then- echo "frame-pure-3d: $n frame $f: the sequence's frame differs from the frame rendered alone ($m; bar SSIM $BAR, $PX pixels): a 3D part kept an earlier frame's inputs or took another's row"- fail=1- else- echo "frame-pure-3d: $n frame $f: $m"+ # the compositions a repro names (`// frame-pure: compositions A B`), else its first; each held to the bar a+ # `// frame-pure: bar X [A B]` line gives it (none named: every one), else BAR. Under Solari two renders of one frame+ # differ by their noise (0.9975 SSIM on kept-light's solari-none), so a Solari repro names 0.99: a part kept in the+ # traced scene scores 0.94 to 0.987 (SG9)+ comps=$(sed -nE 's#^// frame-pure: compositions (.*)#\1#p' "$t" | head -1)+ for c in ${comps:-.}; do+ [ "$c" = . ] && c=+ k=$n${c:+-$c}+ bar=$(awk -v c="$c" '/^\/\/ frame-pure: bar / { for (i = 5; i <= NF; i++) if ($i == c) { print $4; exit } if (NF == 4) any = $4 } END { if (any != "") print any }' "$t" | head -1)+ BAR=${bar:-$BAR0}+ if ! "$R" render "$t" ${c:+--composition "$c"} -o "$W/$k/" >"$W/$k.log" 2>&1; then+ echo "frame-pure-3d: $k: the sequence didn't render:"; grep -v WARN "$W/$k.log" | tail -5; fail=1; continuefi+ len=$(find "$W/$k" -name 'frame-*.png' | wc -l | tr -d ' ')+ [ "${len:-1}" -gt 1 ] || continue+ for f in 0 $((len / 3)) $((2 * len / 3)) $((len - 1)); do+ if ! "$R" render "$t" ${c:+--composition "$c"} --frame "$f" -o "$W/$k-alone-$f.png" >"$W/$k-$f.log" 2>&1; then+ echo "frame-pure-3d: $k: frame $f alone didn't render:"; tail -3 "$W/$k-$f.log"; fail=1; continue+ fi+ seq=$(printf '%s/%s/frame-%05d.png' "$W" "$k" "$f")+ if m=$(differ "$seq" "$W/$k-alone-$f.png"); then+ echo "frame-pure-3d: $k frame $f: the sequence's frame differs from the frame rendered alone ($m; bar SSIM $BAR, $PX pixels): a 3D part kept an earlier frame's inputs, took another's row, or stayed in the traced scene once hidden"+ fail=1+ else+ echo "frame-pure-3d: $k frame $f: $m"+ fi+ donedonedoneexit $faildiff --git a/vendor/bevy_solari/src/realtime/world_cache_compact.wesl b/vendor/bevy_solari/src/realtime/world_cache_compact.weslindex bdd4f80f..402019c1 100644--- a/vendor/bevy_solari/src/realtime/world_cache_compact.wesl+++ b/vendor/bevy_solari/src/realtime/world_cache_compact.wesl@@ -1,6 +1,7 @@import package::realtime::world_cache_query::WORLD_CACHE_EMPTY_CELL;import package::realtime::bindings::{world_cache,+ constants,};enable wgpu_ray_query;@@ -14,7 +15,11 @@ var<workgroup> w2: array<u32, 1024u>;fn decay_world_cache(@builtin(global_invocation_id) global_id: vec3<u32>) {var life = world_cache.life[global_id.x];if life > 0u {- life -= 1u;+ // raea: a reset (a cut) empties the cache whole, as a render's first frame finds it. blend_new_samples resets+ // only the cells it picks to update that frame; the rest kept the last place's light, stored at its exposure,+ // for dozens of frames, so a film rendered whole drew each place after a cut darker or lighter than the same+ // frame rendered alone, and a part gone at a cut left its shade on the floor (docs/stage-guards.feature SG9)+ life = select(life - 1u, 0u, bool(constants.reset));world_cache.life[global_id.x] = life;if life == 0u {