Repository navigation
A mesh carries its own vertex attributes, and a Material reads the ones it names (shader_advanced/custom_vertex_attribute) - #59
Merged
Conversation
…es it names (shader_advanced/custom_vertex_attribute) Bevy's custom_vertex_attribute gives a cube a BlendColor attribute and lays out the material's vertex buffer as [POSITION at 0, BLEND_COLOR at 1] in its specialize. raea now does both: - sdk/render: MeshVertexAttribute.new(name, id, format) and Mesh's ATTRIBUTE_* constants; Mesh3d `attributes` ([[attribute, values]], a value a vertex); Material `vertex_attributes` ([[attribute, location]]). - runtime/scene: the mesh row carries `attributes` from the first frame. - raea-sys-mesh attribute.rs: with_attributes inserts them into the mesh (names interned once, as Bevy's are &'static str); engine/render's shared mesh keys on them, line-neutral. - raea-sys-shader own.rs: the layout is part of the pipeline key, and swap sets the vertex buffer to layout.0.get_layout of the named attributes, as Bevy's specialize does. Parity: frames 5 and 10 at ssim 1.000000, 0 pixels off. Mutants: a green BlendColor, BlendColor at location 0 and four blue vertices fail the bar. Moving the cube 0.1 up and halving the uniform's red pass the bar but the probe counts 6,067 and 36,685 pixels off (the known SSIM blind spot; the real port is 0). skills/ pins raea-skills 5218644 (#7), whose generated sdk.md lists the new names.
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.
Ports Bevy's shader_advanced/custom_vertex_attribute: Mesh3d
attributes(MeshVertexAttribute.new, Mesh's ATTRIBUTE_* constants) and Materialvertex_attributes, which lays out the vertex buffer as Bevy's specialize does. Parity: frames 5 and 10 at ssim 1.000000, 0 pixels off; structural mutants fail the bar.It also bumps skills/ to raea-skills 5218644 (#7), whose generated sdk.md lists the new names. It's a PR rather than agent land because GitButler can't commit a gitlink. L1 passed every step up to skills, and the skills gate passes on this tree.