feat(lambda-rs): Add instanced rendering#75
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces instanced rendering as a first-class feature in the lambda-rs engine, enabling efficient drawing of multiple copies of shared geometry with per-instance data. The implementation maintains backward compatibility while adding new APIs for instance-rate vertex buffers.
Key changes:
- Added
VertexStepModeenum andVertexBufferLayoutstruct to support per-instance vertex attributes - Introduced
with_instance_bufferandwith_buffer_step_modemethods onRenderPipelineBuilder - Added
render-instancing-validationfeature flag for validating instance ranges and buffer bindings - Created comprehensive tutorial and specification documentation with a working instanced quads example
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/tutorials/instanced-quads.md | New tutorial demonstrating instanced rendering with a grid of colored quads |
| docs/tutorials/README.md | Updated index to include new instanced rendering tutorial |
| docs/specs/instanced-rendering.md | Detailed specification for instanced rendering architecture and API design |
| docs/features.md | Documentation for the new render-instancing-validation feature flag |
| crates/lambda-rs/src/render/vertex.rs | Added VertexStepMode enum and VertexBufferLayout struct |
| crates/lambda-rs/src/render/validation.rs | Added validation functions for instance ranges and buffer bindings with tests |
| crates/lambda-rs/src/render/pipeline.rs | Extended RenderPipelineBuilder with instance buffer support and step mode tracking |
| crates/lambda-rs/src/render/mod.rs | Integrated instance validation into render command processing |
| crates/lambda-rs/examples/instanced_quads.rs | Complete working example rendering a 10x10 grid of instanced quads |
| crates/lambda-rs/Cargo.toml | Added render-instancing-validation feature flag |
| crates/lambda-rs-platform/src/wgpu/vertex.rs | Platform-level VertexStepMode mapping to wgpu types |
| crates/lambda-rs-platform/src/wgpu/pipeline.rs | Updated pipeline builder to support step modes with wgpu integration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.