bevyengine/bevy · error
MSAA is not supported when using OrderIndependentTransparenc
Error message
MSAA is not supported when using OrderIndependentTransparency
What it means
Panics from check_msaa when a camera has OrderIndependentTransparencySettings while Msaa is set to more than 1 sample: the OIT implementation is incompatible with multisampled framebuffers, so running both would produce incorrect rendering. The panic fails fast at configuration time.
Source
Thrown at crates/bevy_core_pipeline/src/oit/mod.rs:139
fn configure_camera_depth_usages(
mut cameras: Query<
&mut Camera3d,
(
Changed<Camera3d>,
With<OrderIndependentTransparencySettings>,
),
>,
) {
for mut camera in &mut cameras {
camera.depth_texture_usages.0 |= TextureUsages::TEXTURE_BINDING.bits();
}
}
fn check_msaa(cameras: Query<&Msaa, With<OrderIndependentTransparencySettings>>) {
for msaa in &cameras {
if msaa.samples() > 1 {
panic!("MSAA is not supported when using OrderIndependentTransparency");
}
}
}
#[derive(Clone, Copy, ShaderType)]
pub struct OitFragmentNode {
pub color: u32,
pub depth_alpha: u32,
pub next: u32,
}
/// Holds the buffers that contain the data of all OIT layers.
/// We use one big buffer for the entire app. Each camera will reuse it so it will
/// always be the size of the biggest OIT enabled camera.
#[derive(Resource)]
pub struct OitBuffers {
pub settings: DynamicUniformBuffer<OrderIndependentTransparencySettings>,
pub nodes_capacity: UniformBuffer<u32>,View on GitHub (pinned to 396ca72708)
Solutions
- Set Msaa::Off on cameras using OrderIndependentTransparency
- Remove the OrderIndependentTransparencySettings component if MSAA is required
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/bevy_core_pipeline/src/oit/mod.rs:139 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of bevyengine/bevy@396ca72708 (2026-08-20).
Data as JSON: /api/errors/d01dd6f19f8aaa05.
Report an issue: GitHub.