bevy_core_pipeline::oit

Function prepare_oit_buffers

Source
pub fn prepare_oit_buffers(
    commands: Commands<'_, '_>,
    render_device: Res<'_, RenderDevice>,
    render_queue: Res<'_, RenderQueue>,
    cameras: Query<'_, '_, (&ExtractedCamera, &OrderIndependentTransparencySettings), (Changed<ExtractedCamera>, Changed<OrderIndependentTransparencySettings>)>,
    camera_oit_uniforms: Query<'_, '_, (Entity, &OrderIndependentTransparencySettings)>,
    buffers: ResMut<'_, OitBuffers>,
)
Expand description

This creates or resizes the oit buffers for each camera. It will always create one big buffer that’s as big as the biggest buffer needed. Cameras with smaller viewports or less layers will simply use the big buffer and ignore the rest.