Repository navigation
Every 2D primitive in Mesh2d; Bevy parity for 2d/2d_shapes - #62
Merged
Merged
Conversation
…exact colours; Bevy parity for 2d/2d_shapes
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every Bevy 2D primitive (sectors, segments, annuli, capsules, rhombi, triangles, polylines, convex polygons) and rings in Mesh2d; 2D drawn with Bevy's MSAA and exact sRGB colours; Bevy parity for 2d/2d_shapes (0.999866). The full parity run passes 152 of 152 ported examples. skills/ pins raea-skills 004b866 (#8).