From 41a91d1b765620215198eccb1b2ff8c551d164f0 Mon Sep 17 00:00:00 2001 From: shinyobjectz Date: Fri, 13 Nov 2026 11:15:41 -0800 Subject: [PATCH] A deferred camera's MSAA is left off: msaa_for_3d turned it on again each frame, Bevy turned it off and warned, once a frame in every ray-traced render's log --- systems/post/src/lib.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/systems/post/src/lib.rs b/systems/post/src/lib.rs index 7c460464..467505c4 100644 --- a/systems/post/src/lib.rs +++ b/systems/post/src/lib.rs @@ -20,7 +20,9 @@ pub mod outline; /// A live scene's camera made before its first 3D part (MSAA off, as a 2D scene's is) multisamples once a frame brings /// one, as a render's camera does from its load, which sees every frame's rows (#38: kept-mount's cube mounts at frame /// 10 and had hard edges live). Not one whose row asks for a single-sampled frame (ssao, aa, outline, frame_looks, -/// passes: spawn_camera's rule), and not in preview. +/// passes: spawn_camera's rule), not in preview, and not a deferred camera (a ray-traced one): Bevy turns MSAA off +/// on those itself each frame and says so, so this turned it on again every frame, a warning a frame in a render's +/// log and the camera's pipelines made again for nothing. pub fn msaa_for_3d(world: &mut World, has_3d: bool) { if !has_3d || preview() { return; @@ -28,7 +30,8 @@ pub fn msaa_for_3d(world: &mut World, has_3d: bool) { let cams: Vec = world.query_filtered::>().iter(world).collect(); for e in cams { let single = world.resource::().vals(e).is_none_or(|v| ["ssao", "aa", "outline", "frame_looks", "passes"].iter().any(|k| v.contains_key(*k))); - if !single && world.get::(e) == Some(&Msaa::Off) { + let deferred = world.entity(e).contains::(); + if !single && !deferred && world.get::(e) == Some(&Msaa::Off) { world.entity_mut(e).insert(Msaa::default()); } }