diff --git a/crates/bevy_render/src/color/mod.rs b/crates/bevy_render/src/color/mod.rs index 4a1467cfe5b1f..1f04f528d2fc3 100644 --- a/crates/bevy_render/src/color/mod.rs +++ b/crates/bevy_render/src/color/mod.rs @@ -294,6 +294,7 @@ impl Color { } /// Get alpha. + #[inline(always)] pub fn a(&self) -> f32 { match self { Color::Rgba { alpha, .. } diff --git a/crates/bevy_ui/src/render/mod.rs b/crates/bevy_ui/src/render/mod.rs index e19d7b1731667..80c4b4ab37730 100644 --- a/crates/bevy_ui/src/render/mod.rs +++ b/crates/bevy_ui/src/render/mod.rs @@ -197,6 +197,10 @@ pub fn extract_uinodes( if !images.contains(&image) { continue; } + // Skip completely transparent nodes + if color.0.a() == 0.0 { + continue; + } extracted_uinodes.uinodes.push(ExtractedUiNode { transform: transform.compute_matrix(), color: color.0,