From f8db1a6d4b05b2afec185bebbd6a0ef13df86fc8 Mon Sep 17 00:00:00 2001 From: Marco Buono Date: Sun, 8 Oct 2023 19:49:47 -0300 Subject: [PATCH] Use De Morgan's laws to make `#[cfg()]` more readable --- examples/3d/transmission.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/3d/transmission.rs b/examples/3d/transmission.rs index 1a8b5bfba6..96bc0ff26b 100644 --- a/examples/3d/transmission.rs +++ b/examples/3d/transmission.rs @@ -29,7 +29,7 @@ use bevy::{ render::view::ColorGrading, }; -#[cfg(any(not(feature = "webgl2"), not(target_arch = "wasm32")))] +#[cfg(not(all(feature = "webgl2", target_arch = "wasm32")))] use bevy::core_pipeline::experimental::taa::{TemporalAntiAliasBundle, TemporalAntiAliasPlugin}; use rand::random; @@ -49,7 +49,7 @@ fn main() { // *Note:* TAA is not _required_ for specular transmission, but // it _greatly enhances_ the look of the resulting blur effects. // Sadly, it's not available under WebGL. - #[cfg(any(not(feature = "webgl2"), not(target_arch = "wasm32")))] + #[cfg(not(all(feature = "webgl2", target_arch = "wasm32")))] app.insert_resource(Msaa::Off) .add_plugins(TemporalAntiAliasPlugin); @@ -354,7 +354,7 @@ fn setup( tonemapping: Tonemapping::TonyMcMapface, ..default() }, - #[cfg(any(not(feature = "webgl2"), not(target_arch = "wasm32")))] + #[cfg(not(all(feature = "webgl2", target_arch = "wasm32")))] TemporalAntiAliasBundle::default(), EnvironmentMapLight { diffuse_map: asset_server.load("environment_maps/pisa_diffuse_rgb9e5_zstd.ktx2"), @@ -506,7 +506,7 @@ fn example_control_system( camera.hdr = !camera.hdr; } - #[cfg(any(not(feature = "webgl2"), not(target_arch = "wasm32")))] + #[cfg(not(all(feature = "webgl2", target_arch = "wasm32")))] if input.just_pressed(KeyCode::D) { if depth_prepass.is_none() { commands