mirror of
https://github.com/shinyobjectz/raea.git
synced 2026-12-06 05:33:38 -10:00
* A playable's 3D is drawn by Bevy's own PBR programs (PA11) tools/bevy-glsl composes Bevy's mesh, pbr and prepass shaders with Bevy's ShaderCache for a WebGL2 device and translates them with naga; sdk/playable/bevy/build.sh writes them, with each uniform block's field offsets, into host/bevy/programs.ts, and apps/playable's test fails when Bevy's shaders or the translator change without a rebuild. host/bevy.ts replaces three.js's renderer and the tone pass: it reads raea's three.js scene graph and fills Bevy's blocks as Bevy's render world does (reverse Z, one light cluster, one directional shadow cascade, point and spot lights, distance fog), draws into half float with 4x MSAA, and maps through TonyMcMapface's table. A Plane3d now reaches three.js as its one face, not as a box with no depth whose top face three points down. Against `raea render --frame`: brick-rush portrait frame 90 6.1 -> 4.3 / 255, landscape frame 300 9.8 -> 7.7; a light test scene 0.7 to 1.3 with fog, point and spot lights and an orthographic camera. The page is about 100 KB smaller and its first frame is as fast as before in WebKit. * bevy-glsl gets its layer; one fewer helper and line for the gates tools/layers.toml places bevy-glsl under tools. The translator's one-use int() helper is folded into its call (a duplicate of uint()), so programs.from moves while programs.ts stays byte for byte. scene.ts asks geometry.ts's planeOf for a Plane3d's face in one line, back to 500. --------- Co-authored-by: shinyobjectz <[email protected]>