diff --git a/crates/bevy_render/src/color/mod.rs b/crates/bevy_render/src/color/mod.rs index a00481ffbb794..51c3a21a7cdc9 100644 --- a/crates/bevy_render/src/color/mod.rs +++ b/crates/bevy_render/src/color/mod.rs @@ -379,6 +379,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 036aa51997e17..0a5a171ffccaa 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,