mirror of
https://github.com/shinyobjectz/raea.git
synced 2026-12-01 12:44:11 -10:00
A <Material> in a Mesh2d is Bevy's Material2d: raea-sys-shader's OwnMaterial implements both Material and Material2d (group 3 in 3D, 2 in 2D), so the bindings, the imports beside the file and the packing are one code path; alpha_mode maps to AlphaMode2d (Opaque, Mask, else Blend), and cull_mode now keeps the pipeline's own unless given (Back in 3D, none in 2D, as Bevy's pipelines have them). Mesh2d carries it to Shape2D as `shader`, the shape row keeps it as a JSON column, and raea-sys-sprite's spawn_shape puts MeshMaterial2d<OwnMaterial> on in place of the ColorMaterial, its textures decoded at once (own::picture, which the UiMaterial now uses too). raea's 2D camera draws over the 3D camera on its target. With the 3D camera single-sampled and not Hdr (a 2D-only scene's), the two share one main texture, so the 2D camera's blit used to alpha-blend the finished frame over itself (Bevy blends every camera after the first on a target). It now replaces, as a lone Camera2d's does: a 2D fragment's alpha below 1 reaches the frame as Bevy leaves it. Found by shader/shader_material_2d, whose Mask(0.5) material writes alpha 0.5 and never discards: Bevy's centre pixel (0, 0, 40), raea's was (29, 29, 43) and is now (0, 0, 40). A mixed scene (a multisampled 3D camera) keeps the blend. Port: shader/shader_material_2d, SSIM 1.000000 (the Blend mutant fails, 16384 px off). The full sweep passes 126 of 126.
raea-render
raea-render: raea's render engine. raea compositions are lowered to its program (rows spawned once, keyed per
frame) by sdk/react/ and drawn here, so a render and a live play draw from the same rows with the
same code.
src/engine.rsandsrc/engine/: the Bevy renderer: 3D scenes (meshes, lights, cameras, glTF models, post effects), video frames, the painted pages as image rows (src/rows2d.rs, drawn by bevy_ui) and sound.src/gpuview.rs: the direct GPU path a render encodes from.src/html.rs: HTML compositions, drawn by bevy_ui throughruntime/js/.src/cli.rsandsrc/media_verbs.rs: native media verbs (raea media ..., plusraea ffmpegandraea ffprobe, which read ffmpeg-style command lines without running ffmpeg). raea and the shell run them in process.
Depends on runtime/js/, systems/k/, io/media/ and
gpu/device/.
Status: in use as the renderer behind raea.