A <Text2d> inside a <Canvas3D> is now Bevy's Text2d (raea-sys-sprite text2d.rs, sent as a Shape2D row with its `text` spec): bevy_text lays it out and rasterises it and bevy_sprite_render orders it with the sprites by z, so TextBounds (`bounds`), FontSmoothing::None (`font_smoothing`), Text2dShadow (`shadow`), LineBreak, its <TextSpan>s, a z under a sprite and a scaled quad's pixelated look are Bevy's. After the Canvas3D it is the page's Text, as before; the page refuses bounds, shadow and "None", which it can't draw. 2d/text2d is exact at frames 10 and 60 (SSIM 1.000000, tile 0); with FontSmoothing::None taken out it fails (tile 40, 5308 px off in that block).
TextureAtlasBuilder (raea/sprite, raea/image): pictures packed by Bevy's own builder in the order added (padding, sampler), a sprite showing the whole atlas or one picture (sources.handle(texture), the row's atlas_pick, which sync_2d no longer resets to a sheet's cell). 2d/texture_atlas lists textures/rpg in load_folder's order and passes at 0.998551; its packed atlases match Bevy's.
2d/rotation: the port took the direction to the ship as -at, so the enemy straight above had x = -0 and copysign turned it the other way; player - enemy (0 - 0 = +0) as Bevy subtracts. Passes at 0.999751, its turning enemies within 8 grey of Bevy's at frames 10 and 60 (the bar alone passed a 10 degree a second error).
All 2D ports and shader/pipeline_constants rerun: 155 ported, 155 passing.
skills/ pins raea-skills f81678f (#9), whose generated sdk.md lists TextureAtlasBuilder.
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.
A <Compute file> compiles its shader file as written, binding its own @group(0) storage textures and uniforms
(systems/compute/src/written.rs). Each frame picks the entry point and which image each storage texture binds, as
a Bevy example's render-graph node picks its pipeline and bind group. Its images are render:NAME images in the
storage format the file declares, each with a sampler if one is given.
Strings can now change from frame to frame. A row column holds a number per frame, so a changing string is kept
as the list of values it takes plus a keyed index into it (raea-runtime-look's keyed_strings, read back with
raea-sys-frame's keyed). The changing-picture code for ImagePlane already worked this way and now uses the helper.
A Compute's entry and bind use it, and so does a Sprite's src: a Sprite can show a render:NAME image and switch
to another by name each frame.
The render-image registry (RenderImages) moves into raea-sys-frame, so the sprite system can look images up by
name. raea-runtime-plugins re-exports it.
A still renders only the frames it needs and their neighbours. When a scene has a compute that carries state
between frames (a file's images, or its own buffers), every frame up to the wanted one is now rendered, because
the GPU state can't be rebuilt from one frame.
Load checks every entry name and binding the run uses. A frame whose entry leaves a storage texture unbound is
logged and skips its dispatch.
shader/compute_shader_game_of_life passes at frames 10, 11, 30 and 60 with SSIM 1.0 and 0 pixels off. Frame 11
was added so each of the two images' samplers is drawn. Mutants are caught either by the bar or by the 2% pixel
probe: init a frame late, swapped bindings, alive colour, sprite parity, either image's sampler, clear colour,
scale, and one extra row of workgroups. The extra-row mutant passes SSIM at 0.9994; the probe finds 784 pixels off,
against 0 for the real port.
<Sprite><Material/></Sprite> is Bevy's SpriteMaterial<M>: raea's OwnMaterial is also a MaterialExtension2d, so it
extends the sprite's own SpriteMeshMaterial and its shader reads the sprite through sprite_mesh::functions. A
Material's fixed slots now start at 30, past the sprite's own bindings (a UiMaterial's still start at 0), and an
alpha mode the spec doesn't give leaves the sprite's own.
Live play now carries a Material's values frame by frame: a one-frame program sends its own:uniforms row, and a
component whose target keeps its render id (a sprite, a 2D shape) is no longer dropped.
The parity host's input script takes key names (KeyCode's: "Space"), held in ButtonInput<KeyCode> after Bevy's
input systems, so input_just_pressed sees a press on its update.
shader/sprite_material passes at 6 frames across two Space presses (SSIM 0.99983, the text's tile). Mutants of the
amount, the burn edge's width and the delta fail. A burn-edge colour mutant passes the bar, which can't see a thin
edge's colour, but the edge probe catches it: the same 1721 edge pixels, green total 1428 real against 1266 mutant,
and 1428 in Bevy's. The Material, sprite and 2D ports rerun pass.
A <Material>'s `buffers` are its read-only storage buffers (var<storage, read> NAME: array<T(, N)>, up to two, at
OwnMaterial's 23 and 24), each laid out as WGSL stores its element type (own_live.rs storage; a vec3 takes 16 bytes).
Its uniforms and buffers may change from frame to frame: raea-runtime-look own_uniforms sends them as keyed
`own:uniforms` component rows from each frame they change, and own_live.rs patch packs them into the part's
Material and ShaderBuffers (a row that arrives before shade_rows puts the Material on waits on the part, Pending).
Parts whose spec is the same share one Material, as Bevy's examples share a handle: a varying spec carries its
track's hash, so parts share only when every frame's values match too (own.rs shared, OwnMade, cleared per load).
layout.rs's word encoding is shared by uniforms and buffers.
Port: shader/storage_buffer (SSIM 0.999999 at 30 and 60): 91 cubes with MeshTags (<BevyComponent
bevy_mesh::components::MeshTag>), the example's vertex and fragment shaders from its one file, its colour buffer
recomputed each frame as its update system does. Freezing the colours at frame 0 fails (97310 px off), as does
tagging every cube 0 (76718). The other shader ports rerun and pass.
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.
2D was drawn 0.14% small. An orthographic camera on the engine's w x (h + 1) target (the frame and its tag row) saw
the frame through Bevy's SubCameraView, whose orthographic math sizes its area from the 721-row target. A white rect
at (90, 510) drew at 41..140 instead of 40..139. Every 2D port still passed the pixel bar. Orthographic cameras now
get a w x h Viewport instead (engine target.rs, line-neutral). 2d/sprite and 2d/move_sprite went from SSIM 0.998
(worst tile 8-9) to 1.000000.
New in the SDK:
- Bevy's primitive meshers by name (systems/material mesh.rs): CircularSector, CircularSegment, Segment2d/3d,
Polyline2d/3d, ConvexPolygon, Ring (`inner`, or `ring: thickness` as Bevy's to_ring), Extrusion, the Sphere's uv or
ico kind and Plane3d subdivisions.
- <Model nodes>: glTF nodes' local transforms by name, each frame.
- Lights' shadow_depth_bias and shadow_normal_bias.
- <Sprite image_mode> (Bevy's SpriteImageMode: Auto, Scale, Sliced and Tiled) and <Sprite sampler>. A sprite sheet is
no longer forced to nearest; the ports whose examples use ImagePlugin::default_nearest ask for it.
- Text2d's Anchor, and it no longer wraps (Bevy's Text2d is unbounded).
- Srgba.hex takes Bevy's 3, 4, 6 or 8 digits.
- Quat.slerp.
- The parity probe marks the example's highest-order window camera as the UI camera, unless the example marked one
itself.
New ports, all passing: camera/2d_on_ui, gltf/load_gltf, gltf/gltf_skinned_mesh, animation/animated_transform, 3d/fog,
3d/3d_shapes, 2d/sprite_scale and 2d/sprite_slice.
Mutants:
- Caught by the bar: skinned mesh without the joint pose and at PI/3; animated_transform without the controller's
turn; 3d_shapes with a Cuboid for the Tetrahedron.
- Caught by pixels off: 3d_shapes' ring thickness (4736 vs 2911) and animated_transform's scale key (728 vs 0).
- Passing the bar: fog's end and colour (SSIM 0.989 / 0.990). The real fog port matches Bevy to within 1/255 in every
fogged region, and its 5819 pixels off are the help text.
- sprite_scale's gabe sheets match Bevy byte for byte at frames 10 and 60.
UI. raea's Blitz draws CSS border-image (css-backgrounds-3: slice, width, outset, fill, and stretch, repeat, round or
space per axis), loading border-image-source as a third image layer beside backgrounds and masks. ImageNode's
image_mode { Sliced: TextureSlicer } is that border-image, and data-raea-bevy-slice gives Blitz bevy_ui's own rules: the
corners are the slices times min(the node over the picture, max_corner_scale), and Tile tiles a part from its start
every slice times stretch_value. A flipped sliced picture is mirrored on a layer behind its children. An ImageNode's
image can carry its own sampler ({ path, sampler: { filter } }). UiScale lays its roots out in a window 1/value of the
frame and scales it up. Node takes overflow_clip_margin, which Blitz honours for every clipping overflow as bevy_ui's
resolve_clip_rect does. The page bridge resolves url(..) in a style value (a background, a border-image) as it does
an img's src, which no CSS picture did before.
2D. Shape2D and Mesh2d's ColorMaterial take a texture with its own sampler (raea-sys-sampler) and a uv_transform
(Affine2). Text2d places a Text at its Transform, centred as Bevy's Anchor::CENTER. The shape2d row carries the sampler,
the uv_transform and the vertex colours as JSON in one loop, which keeps raea-runtime-scene under 2,000 lines.
Ported, each with a mutant that fails:
ui/images/ui_texture_slice_flip_and_tile 1.0000 (stretched instead of tiled 0.7857, unflipped 0.8360)
ui/images/ui_texture_slice 0.9990 (corner scale halved 0.9800)
ui/scroll_and_overflow/overflow_clip_margin 0.9968 (without the margin 0.9890, tile 120)
2d/mesh2d_repeated_texture 0.9912 (no uv_transform 0.9420, no sampler 0.9666, Text2d not centred 0.9789)
ui/layout/flex_layout 0.9909 (a Center row as FlexStart 0.9463)
58 of 61 ported pass; many_lights, many_foxes and transparency_3d still fail, as before.