Skip to content

Commit a8ed539

Browse files
committed
[update] color of floor and winding of the floor quad.
1 parent 4c3c4e8 commit a8ed539

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

crates/lambda-rs/examples/reflective_room.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ layout (location = 0) out vec4 fragment_color;
113113
114114
void main() {
115115
// Slightly tint with alpha so the reflection appears through the floor.
116-
fragment_color = vec4(0.1, 0.1, 0.12, 0.5);
116+
// Brightened for visibility against a black clear.
117+
fragment_color = vec4(0.2, 0.2, 0.23, 0.6);
117118
}
118119
"#;
119120

@@ -844,14 +845,15 @@ fn build_floor_quad_mesh(extent: f32) -> Mesh {
844845
let p3 = v(-h, h);
845846

846847
let mut mesh_builder = MeshBuilder::new();
848+
// Tri winding flipped to face +Y (avoid back-face cull)
847849
// Tri 1
848850
mesh_builder.with_vertex(p0);
849-
mesh_builder.with_vertex(p1);
850851
mesh_builder.with_vertex(p2);
852+
mesh_builder.with_vertex(p1);
851853
// Tri 2
852854
mesh_builder.with_vertex(p0);
853-
mesh_builder.with_vertex(p2);
854855
mesh_builder.with_vertex(p3);
856+
mesh_builder.with_vertex(p2);
855857

856858
let mesh = mesh_builder
857859
.with_attributes(vec![

0 commit comments

Comments
 (0)