-
Notifications
You must be signed in to change notification settings - Fork 2
feat(lambda-rs): Add instanced rendering #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
No description provided.