Skip to content

Commit 76bcbad

Browse files
committed
Fix 3d background clear.
1 parent 8d27362 commit 76bcbad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/processing_render/src/render/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1314,7 +1314,7 @@ fn create_ndc_background_quad(world_from_clip: Mat4, color: Color, with_uvs: boo
13141314
use bevy::asset::RenderAssetUsages;
13151315
use bevy::mesh::{Indices, PrimitiveTopology};
13161316

1317-
let ndc_z = 0.0;
1317+
let ndc_z = f32::EPSILON;
13181318
let ndc_corners = [
13191319
Vec4::new(-1.0, -1.0, ndc_z, 1.0), // bl
13201320
Vec4::new(1.0, -1.0, ndc_z, 1.0), // br

examples/box.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fn sketch() -> error::Result<()> {
3131
transform_set_position(graphics, Vec3::new(100.0, 100.0, 300.0))?;
3232
transform_look_at(graphics, Vec3::new(0.0, 0.0, 0.0))?;
3333

34-
let mut angle = 0.0;
34+
let mut angle: f32 = 0.0;
3535

3636
while glfw_ctx.poll_events() {
3737
graphics_begin_draw(graphics)?;

0 commit comments

Comments
 (0)