{"record":{"id":"d01dd6f19f8aaa05","repo":"bevyengine/bevy","slug":"msaa-is-not-supported-when-using-orderindependentt","errorCode":null,"errorMessage":"MSAA is not supported when using OrderIndependentTransparency","messagePattern":"MSAA is not supported when using OrderIndependentTransparency","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/bevy_core_pipeline/src/oit/mod.rs","lineNumber":139,"sourceCode":"\nfn configure_camera_depth_usages(\n    mut cameras: Query<\n        &mut Camera3d,\n        (\n            Changed<Camera3d>,\n            With<OrderIndependentTransparencySettings>,\n        ),\n    >,\n) {\n    for mut camera in &mut cameras {\n        camera.depth_texture_usages.0 |= TextureUsages::TEXTURE_BINDING.bits();\n    }\n}\n\nfn check_msaa(cameras: Query<&Msaa, With<OrderIndependentTransparencySettings>>) {\n    for msaa in &cameras {\n        if msaa.samples() > 1 {\n            panic!(\"MSAA is not supported when using OrderIndependentTransparency\");\n        }\n    }\n}\n\n#[derive(Clone, Copy, ShaderType)]\npub struct OitFragmentNode {\n    pub color: u32,\n    pub depth_alpha: u32,\n    pub next: u32,\n}\n\n/// Holds the buffers that contain the data of all OIT layers.\n/// We use one big buffer for the entire app. Each camera will reuse it so it will\n/// always be the size of the biggest OIT enabled camera.\n#[derive(Resource)]\npub struct OitBuffers {\n    pub settings: DynamicUniformBuffer<OrderIndependentTransparencySettings>,\n    pub nodes_capacity: UniformBuffer<u32>,","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_core_pipeline/src/oit/mod.rs#L121-L157","documentation":"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.","triggerScenarios":"Thrown at crates/bevy_core_pipeline/src/oit/mod.rs:139 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set Msaa::Off on cameras using OrderIndependentTransparency","Remove the OrderIndependentTransparencySettings component if MSAA is required"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"396ca727080776bd313bb892423b7d94e03b81b4","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}