Repository navigation
test(compositor): measure the Glass Lens refraction as an edge shift - #1093
Conversation
The flat lens test counted pixels whose brightness changed under the glass, which the lens lighting alone satisfies: it stayed green with the refraction off (IOR 1.0). Render vertical stripes and their inverse under the lens instead; the sign of the difference tells which stripe each pixel sees, whatever light the glass adds. Edges seen through the lens must sit at least 3 px from every edge of the same row without it. Measured on D3D11: 23 and 67 shifted edges (up to 5.5 px) at IOR 1.5, none (1 px at most) at IOR 1.0. Same oracle in the lavapipe twin.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to The changed tests target stripe-edge displacement, and no concrete issue is established that would prevent merging after normal checks. Pre-merge checks |
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
the_flat_glass_lens_refracts_the_picturenow measures the refraction itself. The oldmovedcheck counted pixels whose brightness changed under the glass, which the lens lighting alone satisfies: it stayed green with the refraction off (IOR 1.0).compositor_linux.rs.Related issue
Refs #1019 (follow-up to the review nitpick confirmed by @My-Denia).
Type of change
Release impact
Desktop impact
Testing
cargo test -p openscreen-compositor --test cursor_model_render, 10/10 green. WithGLASS_IOR = 1.0inshaders.hlsl, the new test fails and the old one passes.nix develop .#compositor-view): same numbers as D3D11, and the same red withGLASS_IOR = 1.0inlayer.wgsl.cargo checkonly); the Linux twin runs inrust-linux-compositor-check.🤖 Generated with Claude Code
Summary by CodeRabbit