Files
raea/tools/nobuild/blur.tsx
shinyobjectz 1dee25c609 Steady's rates, motion blur's kind, the path tracer's samples and air, and Solari's dynamic are props, each checked against its variable
Eight more environment variables become props, each variable now only an override on every camera:
- <AntiAliasing steady={{ still, moving, px }}>: steady's rates (systems/post Steady's fields), over RAEA_STEADY_*.
  RAEA_STEADY stays the every-camera form of mode="steady".
- <MotionBlur kind="shutter"|"bevy">, over RAEA_MOTION_BLUR.
- <Pathtracer samples media>, over RAEA_LIGHT_SPP and RAEA_PT_MEDIA=0. They live in raea_sys_frame::pathtracer
  (PathtracerSettings), so the fog's volumes can read media. A render draws each frame as many times as the most any
  camera asks for.
- <SolariLighting dynamic>, over RAEA_SOLARI_DYNAMIC. This was read once when the plugin was built. It is now a
  SolariSettings field, and the skin-twin and hidden-part systems run while any traced camera asks for it.

tools/nobuild.sh props gains a column for the composition the variables go on (RAEA_STEADY needs a scene without
steady), and a "traced" light path for a scene that asks for Solari or the path tracer itself. Settings with no trace
record of their own are checked by pixels alone. Three fixtures join fog.tsx: steady.tsx, blur.tsx and traced.tsx
(Pathtracer and Solari, with a slab there on the first frame only). All 15 rows pass:
- steady, its rates and the blur's kind are pixel-identical to their variables;
- the path tracer is deterministic, so samples and media compare exactly too: 21 and 27 levels from the default's;
- dynamic is as near its variable as two runs are (0.013 against 0.014), and the hidden slab's shadow is gone (5.8
  levels).

docs/nobuild.feature NB1a.
2026-11-22 09:15:58 -08:00

30 lines
1.4 KiB
TypeScript

import { Composition, registerRoot, useCurrentFrame } from "raea";
import { MotionBlur } from "raea/post_process";
import { Camera3d } from "raea/camera";
import { DirectionalLight } from "raea/light";
import { Cuboid, Mesh3d } from "raea/mesh";
import { StandardMaterial } from "raea/pbr";
import { Transform } from "raea/transform";
// docs/nobuild.feature NB1a: <MotionBlur kind> against RAEA_MOTION_BLUR (tools/nobuild.sh props). A block whipping
// across a still floor.
function Scene({ kind }: { kind: "shutter" | "bevy" }) {
const f = useCurrentFrame();
return (
<>
<Camera3d transform={Transform.fromXyz(0, 1.5, 5).lookingAt([0, 0.5, 0])} />
<MotionBlur shutterAngle={1} kind={kind} />
<DirectionalLight illuminance={6000} transform={Transform.fromXyz(3, 5, 2).lookingAt([0, 0, 0])} />
<Mesh3d><Cuboid half_size={[5, 0.02, 5]} /><StandardMaterial base_color="#3a3d44" /></Mesh3d>
<Mesh3d transform={Transform.fromXyz(-3 + f * 0.6, 0.5, 0)}><Cuboid half_size={[0.4, 0.4, 0.4]} /><StandardMaterial base_color="#f1c40f" /></Mesh3d>
</>
);
}
registerRoot(() => (
<>
<Composition id="shutter" component={() => <Scene kind="shutter" />} width={320} height={180} fps={30} durationInFrames={8} />
<Composition id="bevy" component={() => <Scene kind="bevy" />} width={320} height={180} fps={30} durationInFrames={8} />
</>
));