bevy/crates/bevy_render/src/view
Robin KAY dc25edd0a2
Fix MSAA writeback when 3 or more cameras have the same target. (#11968)
# Objective

If multiple cameras render to the same target with MSAA enabled, only
the first and the last camera output will appear in the final output*.
This is because each camera maintains a separate flag to track the
active main texture. The first camera renders to texture A and all
subsequent cameras first write-back from A and then render into texture
B. Hence, camera 3 onwards will overwrite the work of the previous
camera.

\* This would manifest slightly differently if there were other calls to
post_process_write() in a more complex setup.

The is a functional regression from Bevy 0.12.

## Solution

The flag which tracks the active main texture should be shared between
cameras with the same `NormalizedRenderTarget`. Add the
`Arc<AtomicUsize>` to the existing per-target cache.
2024-02-20 22:16:28 +00:00
..
visibility refactor: Extract parallel queue abstraction (#7348) 2024-02-19 16:31:15 +00:00
window Move EntityHash related types into bevy_ecs (#11498) 2024-02-12 15:02:24 +00:00
mod.rs Fix MSAA writeback when 3 or more cameras have the same target. (#11968) 2024-02-20 22:16:28 +00:00
view.wgsl Exposure settings (adopted) (#11347) 2024-01-16 14:53:21 +00:00