Skip to content

feat(lambda-rs): Add Depth tests, stencil tests, and MSAA - #71

Merged
vmarcella merged 25 commits into
mainfrom
vmarcella/depth-stencils-msaa
Nov 21, 2025
Merged

feat(lambda-rs): Add Depth tests, stencil tests, and MSAA#71
vmarcella merged 25 commits into
mainfrom
vmarcella/depth-stencils-msaa

Conversation

@vmarcella

Copy link
Copy Markdown
Member

No description provided.

CopilotAI left a comment

Copy link
Copy Markdown

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 adds depth testing, stencil testing, and multi-sample anti-aliasing (MSAA) support to the lambda-rs rendering engine, enabling advanced 3D rendering techniques such as planar reflections.

Key Changes:

  • Introduced depth/stencil operations and MSAA configuration through builder APIs without exposing wgpu types
  • Added comprehensive validation with feature-gated logging for debug and release builds
  • Created a reflective floor example demonstrating stencil-masked planar reflections with 4× MSAA

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 11 comments.

Show a summary per file
FileDescription
docs/tutorials/reflective-room.mdNew tutorial explaining stencil buffer usage for planar reflections with depth testing and MSAA
docs/tutorials/README.mdUpdated index to include the reflective room tutorial
docs/specs/depth-stencil-msaa.mdSpecification document defining API surface, validation, and behavior for depth/stencil/MSAA features
docs/features.mdDocumentation of Cargo feature flags for render validation behavior
crates/lambda-rs/src/util/mod.rsNew utility module providing warn-once functionality to deduplicate validation messages
crates/lambda-rs/src/render/validation.rsAdded sample count validation helper
crates/lambda-rs/src/render/texture.rsIntroduced engine-level DepthFormat enum mapping to platform types
crates/lambda-rs/src/render/render_pass.rsExtended builders with depth/stencil operations, MSAA support, and device capability validation
crates/lambda-rs/src/render/pipeline.rsAdded depth compare functions, stencil state configuration, and MSAA to pipeline builders
crates/lambda-rs/src/render/mod.rsUpdated render context to manage MSAA color attachments, depth/stencil textures, and pass/pipeline compatibility validation
crates/lambda-rs/src/render/command.rsAdded SetStencilReference command for dynamic stencil reference updates
crates/lambda-rs/src/render/window.rsRemoved unused monitor handle retrieval code
crates/lambda-rs/src/lib.rsExported new util module
crates/lambda-rs/examples/reflective_room.rsComplete example demonstrating stencil-masked planar reflection with toggleable MSAA, depth testing, and stencil
crates/lambda-rs/Cargo.tomlAdded granular render-validation feature flags for opt-in validation in release builds
crates/lambda-rs-platform/src/winit/mod.rsChanged monitor handle to optional and improved window creation flow
crates/lambda-rs-platform/src/wgpu/texture.rsAdded ColorAttachmentTexture for MSAA render targets
crates/lambda-rs-platform/src/wgpu/surface.rsExposed common BGRA8_UNORM_SRGB surface format constant
crates/lambda-rs-platform/src/wgpu/render_pass.rsExtended render pass builder with stencil operations and MSAA resolve support
crates/lambda-rs-platform/src/wgpu/pipeline.rsAdded depth compare, stencil state, and sample count configuration to pipeline builder
crates/lambda-rs-platform/src/wgpu/gpu.rsImplemented device capability queries for MSAA sample count support

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threaddocs/tutorials/reflective-room.md Outdated
Comment threadcrates/lambda-rs/src/render/render_pass.rs Outdated
Comment threadcrates/lambda-rs/src/render/pipeline.rs Outdated
Comment threadcrates/lambda-rs/src/render/mod.rs
Comment threaddocs/specs/depth-stencil-msaa.md
Comment threaddocs/tutorials/reflective-room.md
Comment threadcrates/lambda-rs-platform/src/winit/mod.rs
Comment threadcrates/lambda-rs/src/util/mod.rs Outdated
Comment threadcrates/lambda-rs-platform/src/winit/mod.rs
Comment threaddocs/features.md
@vmarcella
vmarcella merged commit 1317c1c into mainNov 21, 2025
5 checks passed
@vmarcella
vmarcella deleted the vmarcella/depth-stencils-msaa branch November 21, 2025 23:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@vmarcella