ronantakizawa/codereview-bench huggingface dataset:
Repository: bevyengine/bevy
File: crates/bevy_render/src/lib.rs (Rust)

Code before:
//! # Useful Environment Variables
//! Both `bevy_render` and `wgpu` have a number of environment variable options for changing the runtime behavior
//! of both crates. Many of these may be useful in development or release environments. 
//!
//! - `WGPU_DEBUG=1` enables debug labels in release builds
//! - `WGPU_VALIDATION=0` disables validation layers
//! - `WGPU_FORCE_FALLBACK_ADAPTER=1` attempts to force software rendering
//! - `WGPU_ADAPTER_NAME`: select a specific adapter by name
//! - `WGPU_SETTINGS_PRIO=webgl2` uses webgl2 limits
//! - `WGPU_SETTINGS_PRIO=compatibility` uses webgpu limits
//! - `VERBOSE_SHADER_ERROR=1` prints more detailed information about WGSL compilation errors

#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")]
#![expect(unsafe_code, reason = "Unsafe code is used to improve performance.")]
#![cfg_attr(
    any(docsrs, docsrs_dep),
    expect(
        internal_features,
        reason = "rustdoc_internals is needed for fake_variadic"
    )
)]
#![cfg_attr(any(docsrs, docsrs_dep), feature(doc_auto_cfg, rustdoc_internals))]
#![doc(
    html_logo_url = "https://bevy.org/assets/icon.png",
    html_favicon_url = "https://bevy.org/assets/icon.png"
)]

Review comment (suggestion):
```suggestion
//! # Useful Environment Variables
//!
```

Code after:
//! # Useful Environment Variables
//!
//! Both `bevy_render` and `wgpu` have a number of environment variable options for changing the runtime behavior
//! of both crates. Many of these may be useful in development or release environments.
//!
//! - `WGPU_DEBUG=1` enables debug labels, which can be useful in release builds.
//! - `WGPU_VALIDATION=0` disables validation layers. This can help with particularly spammy errors.
//! - `WGPU_FORCE_FALLBACK_ADAPTER=1` attempts to force software rendering. This typically matches what is used in CI.
//! - `WGPU_ADAPTER_NAME` allows selecting a specific adapter by name.
//! - `WGPU_SETTINGS_PRIO=webgl2` uses webgl2 limits.
//! - `WGPU_SETTINGS_PRIO=compatibility` uses webgpu limits.
//! - `VERBOSE_SHADER_ERROR=1` prints more detailed information about WGSL compilation errors, such as shader defs and shader entrypoint.

#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")]
#![expect(unsafe_code, reason = "Unsafe code is used to improve performance.")]
#![cfg_attr(
    any(docsrs, docsrs_dep),
    expect(
        internal_features,
        reason = "rustdoc_internals is needed for fake_variadic"
    )
)]
#![cfg_attr(any(docsrs, docsrs_dep), feature(doc_auto_cfg, rustdoc_internals))]
#![doc(
    html_logo_url = "https://bevy.org/assets/icon.png",
    html_favicon_url = "https://bevy.org/assets/icon.png"
Repository: bevyengine/bevy
File: crates/bevy_render/src/lib.rs (Rust)

Code before:
//! # Useful Environment Variables
//!
//! Both `bevy_render` and `wgpu` have a number of environment variable options for changing the runtime behavior
//! of both crates. Many of these may be useful in development or release environments. 
//!
//! - `WGPU_DEBUG=1` enables debug labels, which can be useful in release builds.
//! - `WGPU_VALIDATION=0` disables validation layers. This can help with particularly spammy errors.
//! - `WGPU_FORCE_FALLBACK_ADAPTER=1` attempts to force software rendering. This typically matches what is used in CI.
//! - `WGPU_ADAPTER_NAME` allows selecting a specific adapter by name.
//! - `WGPU_SETTINGS_PRIO=webgl2` uses webgl2 limits.
//! - `WGPU_SETTINGS_PRIO=compatibility` uses webgpu limits.
//! - `VERBOSE_SHADER_ERROR=1` prints more detailed information about WGSL compilation errors, such as shader defs and shader entrypoint.

#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")]
#![expect(unsafe_code, reason = "Unsafe code is used to improve performance.")]
#![cfg_attr(
    any(docsrs, docsrs_dep),
    expect(
        internal_features,
        reason = "rustdoc_internals is needed for fake_variadic"
    )
)]
#![cfg_attr(any(docsrs, docsrs_dep), feature(doc_auto_cfg, rustdoc_internals))]
#![doc(
    html_logo_url = "https://bevy.org/assets/icon.png",
    html_favicon_url = "https://bevy.org/assets/icon.png"
)]

#[cfg(target_pointer_width = "16")]

Review comment (suggestion):
```suggestion
//! of both crates. Many of these may be useful in development or release environments.
```

Code after:
//! # Useful Environment Variables
//!
//! Both `bevy_render` and `wgpu` have a number of environment variable options for changing the runtime behavior
//! of both crates. Many of these may be useful in development or release environments.
//!
//! - `WGPU_DEBUG=1` enables debug labels, which can be useful in release builds.
//! - `WGPU_VALIDATION=0` disables validation layers. This can help with particularly spammy errors.
//! - `WGPU_FORCE_FALLBACK_ADAPTER=1` attempts to force software rendering. This typically matches what is used in CI.
//! - `WGPU_ADAPTER_NAME` allows selecting a specific adapter by name.
//! - `WGPU_SETTINGS_PRIO=webgl2` uses webgl2 limits.
//! - `WGPU_SETTINGS_PRIO=compatibility` uses webgpu limits.
//! - `VERBOSE_SHADER_ERROR=1` prints more detailed information about WGSL compilation errors, such as shader defs and shader entrypoint.

#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")]
#![expect(unsafe_code, reason = "Unsafe code is used to improve performance.")]
#![cfg_attr(
    any(docsrs, docsrs_dep),
    expect(
        internal_features,
        reason = "rustdoc_internals is needed for fake_variadic"
    )
)]
#![cfg_attr(any(docsrs, docsrs_dep), feature(doc_auto_cfg, rustdoc_internals))]
#![doc(
    html_logo_url = "https://bevy.org/assets/icon.png",
    html_favicon_url = "https://bevy.org/assets/icon.png"
)]

#[cfg(target_pointer_width = "16")]
Repository: bevyengine/bevy
File: crates/bevy_internal/src/prelude.rs (Rust)

Code before:
#[doc(hidden)]
#[cfg(feature = "bevy_image")]
pub use crate::mesh::prelude::*;

pub use bevy_derive::{bevy_main, Deref, DerefMut};

#[doc(hidden)]
#[cfg(feature = "bevy_asset")]
pub use crate::asset::prelude::*;

#[doc(hidden)]
#[cfg(feature = "bevy_audio")]
pub use crate::audio::prelude::*;

#[doc(hidden)]
#[cfg(feature = "bevy_animation")]
pub use crate::animation::prelude::*;

#[doc(hidden)]
#[cfg(feature = "bevy_color")]
pub use crate::color::prelude::*;

#[doc(hidden)]
#[cfg(feature = "bevy_core_pipeline")]
pub use crate::core_pipeline::prelude::*;

#[doc(hidden)]
#[cfg(feature = "bevy_pbr")]
pub use crate::pbr::prelude::*;

#[doc(hidden)]
#[cfg(feature = "bevy_render")]
pub use crate::render::prelude::*;

#[doc(hidden)]
#[cfg(feature = "bevy_scene")]
pub use crate::scene::prelude::*;

#[doc(hidden)]
#[cfg(feature = "bevy_sprite")]
pub use crate::sprite::prelude::*;

#[doc(hidden)]
#[cfg(feature = "bevy_text")]
pub use crate::text::prelude::*;

#[doc(hidden)]
#[cfg(feature = "bevy_ui")]
pub use crate::ui::prelude::*;

#[doc(hidden)]

Review comment (suggestion):
Note: this prelude is obsolete, because it only re-exported camera types which are now covered by bevy_camera, but left in the crate itself because removing it would be a breaking change. It will yeet in 0.18

Code after:
#[doc(hidden)]
#[cfg(feature = "bevy_mesh")]
pub use crate::mesh::prelude::*;

#[doc(hidden)]
#[cfg(feature = "bevy_camera")]
pub use crate::camera::prelude::*;

pub use bevy_derive::{bevy_main, Deref, DerefMut};

#[doc(hidden)]
#[cfg(feature = "bevy_asset")]
pub use crate::asset::prelude::*;

#[doc(hidden)]
#[cfg(feature = "bevy_audio")]
pub use crate::audio::prelude::*;

#[doc(hidden)]
#[cfg(feature = "bevy_animation")]
pub use crate::animation::prelude::*;

#[doc(hidden)]
#[cfg(feature = "bevy_color")]
pub use crate::color::prelude::*;

#[doc(hidden)]
#[cfg(feature = "bevy_pbr")]
pub use crate::pbr::prelude::*;

#[doc(hidden)]
#[cfg(feature = "bevy_render")]
pub use crate::render::prelude::*;

#[doc(hidden)]
#[cfg(feature = "bevy_scene")]
pub use crate::scene::prelude::*;

#[doc(hidden)]
#[cfg(feature = "bevy_sprite")]
pub use crate::sprite::prelude::*;

#[doc(hidden)]
#[cfg(feature = "bevy_text")]
pub use crate::text::prelude::*;

#[doc(hidden)]
#[cfg(feature = "bevy_ui")]
pub use crate::ui::prelude::*;

#[doc(hidden)]
Repository: bevyengine/bevy
File: crates/bevy_math/src/rotation2d.rs (Rust)

Code before:
    fn slerp() {
        let rot1 = Rot2::IDENTITY;
        let rot2 = Rot2::degrees(135.0);

        assert_eq!(rot1.slerp(rot2, 1.0 / 3.0).as_degrees(), 45.0);
        assert!(rot1.slerp(rot2, 0.0).is_near_identity());
        assert_eq!(rot1.slerp(rot2, 0.5).as_degrees(), 67.5);
        assert_eq!(rot1.slerp(rot2, 1.0).as_degrees(), 135.0);

        let rot1 = Rot2::IDENTITY;
        let rot2 = Rot2::from_sin_cos(0.0, -1.0);

        assert!(ops::abs(rot1.slerp(rot2, 1.0 / 3.0).as_degrees() - 60.0) < 10e-6);
        assert!(rot1.slerp(rot2, 0.0).is_near_identity());
        assert_eq!(rot1.slerp(rot2, 0.5).as_degrees(), 90.0);
        assert_eq!(ops::abs(rot1.slerp(rot2, 1.0).as_degrees()), 180.0);
    }

    #[test]
    fn rotation_matrix() {
        let rotation = Rot2::degrees(90.0);
        let matrix: Mat2 = rotation.into();

        // Check that the matrix is correct.
        assert_relative_eq!(matrix.x_axis, Vec2::Y);
        assert_relative_eq!(matrix.y_axis, -Vec2::X);

        // Check that the matrix rotates vectors correctly.
        assert_relative_eq!(matrix * Vec2::X, Vec2::Y);
        assert_relative_eq!(matrix * Vec2::Y, Vec2::NEG_X);
        assert_relative_eq!(matrix * Vec2::NEG_X, Vec2::NEG_Y);
        assert_relative_eq!(matrix * Vec2::NEG_Y, Vec2::X);
    }
}


Review comment (suggestion):
for consistency
```suggestion
        assert_relative_eq!(matrix.y_axis, Vec2::NEG_X);
```

Code after:
    fn slerp() {
        let rot1 = Rot2::IDENTITY;
        let rot2 = Rot2::degrees(135.0);

        assert_eq!(rot1.slerp(rot2, 1.0 / 3.0).as_degrees(), 45.0);
        assert!(rot1.slerp(rot2, 0.0).is_near_identity());
        assert_eq!(rot1.slerp(rot2, 0.5).as_degrees(), 67.5);
        assert_eq!(rot1.slerp(rot2, 1.0).as_degrees(), 135.0);

        let rot1 = Rot2::IDENTITY;
        let rot2 = Rot2::from_sin_cos(0.0, -1.0);

        assert!(ops::abs(rot1.slerp(rot2, 1.0 / 3.0).as_degrees() - 60.0) < 10e-6);
        assert!(rot1.slerp(rot2, 0.0).is_near_identity());
        assert_eq!(rot1.slerp(rot2, 0.5).as_degrees(), 90.0);
        assert_eq!(ops::abs(rot1.slerp(rot2, 1.0).as_degrees()), 180.0);
    }

    #[test]
    fn rotation_matrix() {
        let rotation = Rot2::degrees(90.0);
        let matrix: Mat2 = rotation.into();

        // Check that the matrix is correct.
        assert_relative_eq!(matrix.x_axis, Vec2::Y);
        assert_relative_eq!(matrix.y_axis, Vec2::NEG_X);

        // Check that the matrix rotates vectors correctly.
        assert_relative_eq!(matrix * Vec2::X, Vec2::Y);
        assert_relative_eq!(matrix * Vec2::Y, Vec2::NEG_X);
        assert_relative_eq!(matrix * Vec2::NEG_X, Vec2::NEG_Y);
        assert_relative_eq!(matrix * Vec2::NEG_Y, Vec2::X);
    }
}
Repository: bevyengine/bevy
File: crates/bevy_render/src/renderer/raw_vulkan_init.rs (Rust)

Code before:
use bevy_ecs::resource::Resource;
use bevy_platform::collections::HashSet;
use std::{
    any::{Any, TypeId},
    sync::Arc,
};
use thiserror::Error;
use wgpu::{
    hal::api::Vulkan, Adapter, Device, DeviceDescriptor, Instance, InstanceDescriptor, Queue,
};

/// When the `raw_vulkan_init` feature is enabled, these settings will be used to configure the raw vulkan instance.
#[derive(Resource, Default, Clone)]
pub struct RawVulkanInitSettings {
    pub create_instance_callbacks: Vec<
        Arc<
            dyn Fn(
                    &mut wgpu::hal::vulkan::CreateInstanceCallbackArgs,
                    &mut AdditionalVulkanFeatures,
                ) + Send
                + Sync,
        >,
    >,
    pub create_device_callbacks: Vec<
        Arc<
            dyn Fn(
                    &mut wgpu::hal::vulkan::CreateDeviceCallbackArgs,
                    &wgpu::hal::vulkan::Adapter,
                    &mut AdditionalVulkanFeatures,
                ) + Send
                + Sync,
        >,
    >,
}

pub(crate) fn create_raw_vulkan_instance(
    instance_descriptor: &InstanceDescriptor,
    settings: &RawVulkanInitSettings,
    additional_features: &mut AdditionalVulkanFeatures,
) -> Instance {

Review comment (suggestion):
These callbacks relate to the safety invariants in the unsafe `Vulkan::init_with_callbacks`, so registering a new callback should be unsafe. 

Code after:
use alloc::sync::Arc;
use bevy_ecs::resource::Resource;
use bevy_platform::collections::HashSet;
use core::any::{Any, TypeId};
use thiserror::Error;
use wgpu::{
    hal::api::Vulkan, Adapter, Device, DeviceDescriptor, Instance, InstanceDescriptor, Queue,
};

/// When the `raw_vulkan_init` feature is enabled, these settings will be used to configure the raw vulkan instance.
#[derive(Resource, Default, Clone)]
pub struct RawVulkanInitSettings {
    // SAFETY: this must remain private to ensure that registering callbacks is unsafe
    create_instance_callbacks: Vec<
        Arc<
            dyn Fn(
                    &mut wgpu::hal::vulkan::CreateInstanceCallbackArgs,
                    &mut AdditionalVulkanFeatures,
                ) + Send
                + Sync,
        >,
    >,
    // SAFETY: this must remain private to ensure that registering callbacks is unsafe
    create_device_callbacks: Vec<
        Arc<
            dyn Fn(
                    &mut wgpu::hal::vulkan::CreateDeviceCallbackArgs,
                    &wgpu::hal::vulkan::Adapter,
                    &mut AdditionalVulkanFeatures,
                ) + Send
                + Sync,
        >,
    >,
}

impl RawVulkanInitSettings {
    /// Adds a new Vulkan create instance callback. See [`wgpu::hal::vulkan::Instance::init_with_callback`] for details.
    ///
    /// # Safety
    /// - Callback must not remove features.
Repository: bevyengine/bevy
File: crates/bevy_tasks/src/futures.rs (Rust)

Code before:
//! Utilities for working with [`Future`]s.
use core::{
    future::Future,
    pin::{pin, Pin},
    task::{Context, Poll, Waker},
};

/// Consumes a future, polls it once, and immediately returns the output
/// or returns `None` if it wasn't ready yet.
///
/// This will cancel the future if it's not ready.
pub fn now_or_never<F: Future>(future: F) -> Option<F::Output> {
    let mut cx = Context::from_waker(Waker::noop());
    match pin!(future).poll(&mut cx) {
        Poll::Ready(x) => Some(x),
        _ => None,
    }
}

/// Polls a future once, and returns the output if ready
/// or returns `None` if it wasn't ready yet.
pub fn check_ready<F: Future + Unpin>(future: &mut F) -> Option<F::Output> {
    let mut cx = Context::from_waker(Waker::noop());
    match Pin::new(future).poll(&mut cx) {
        Poll::Ready(x) => Some(x),
        _ => None,
    }
}


Review comment (suggestion):
`now_or_never` and `check_ready` appear to be identical in function except for their signatures. `check_ready` could be implemented by calling `now_or_never(future)` since `Future` is implemented for `&mut F`. Not sure if that would be clearer overall or not.

Code after:
//! Utilities for working with [`Future`]s.
use core::{
    future::Future,
    pin::pin,
    task::{Context, Poll, Waker},
};

/// Consumes a future, polls it once, and immediately returns the output
/// or returns `None` if it wasn't ready yet.
///
/// This will cancel the future if it's not ready.
pub fn now_or_never<F: Future>(future: F) -> Option<F::Output> {
    let mut cx = Context::from_waker(Waker::noop());
    match pin!(future).poll(&mut cx) {
        Poll::Ready(x) => Some(x),
        _ => None,
    }
}

/// Polls a future once, and returns the output if ready
/// or returns `None` if it wasn't ready yet.
pub fn check_ready<F: Future + Unpin>(future: &mut F) -> Option<F::Output> {
    now_or_never(future)
}
Repository: bevyengine/bevy
File: crates/bevy_pbr/src/atmosphere/mod.rs (Rust)

Code before:
    type QueryFilter = (With<Camera3d>, With<Atmosphere>);

    type Out = AtmosphereSettings;

    fn extract_component(item: QueryItem<'_, '_, Self::QueryData>) -> Option<Self::Out> {
        Some(item.clone())
    }
}

fn configure_camera_depth_usages(
    mut cameras: Query<&mut Camera3d, (Changed<Camera3d>, With<Atmosphere>)>,
) {
    for mut camera in &mut cameras {
        camera.depth_texture_usages.0 |= TextureUsages::TEXTURE_BINDING.bits();
    }
}

/// The rendering method to use for the atmosphere.
#[derive(Clone, Default, Reflect, Copy)]
pub enum AtmosphereRenderingMethod {
    /// Use the default rendering method which uses a 3D lookup texture
    /// fitted to the view frustum.
    #[default]
    Default,
    /// Use the raymarching rendering method which uses raymarching to
    /// compute the atmosphere and supports volumetric shadows.
    Raymarching,
}


Review comment (performance):
```suggestion
    /// Use a 3D lookup texture to render the atmosphere.
    /// This is faster, but does not support volumetric shadows or views from space.
    #[default]
    Default,
    /// Use raymarching to render the atmosphere.
    /// This is slower, but supports volumetric shadows and views from space.
```

Code after:
    pub multiscattering_lut_samples: u32,
    pub sky_view_lut_samples: u32,
    pub aerial_view_lut_samples: u32,
    pub aerial_view_lut_max_distance: f32,
    pub scene_units_to_m: f32,
    pub sky_max_samples: u32,
    pub rendering_method: u32,
}

impl Default for GpuAtmosphereSettings {
    fn default() -> Self {
        AtmosphereSettings::default().into()
    }
}

impl From<AtmosphereSettings> for GpuAtmosphereSettings {
    fn from(s: AtmosphereSettings) -> Self {
        Self {
            transmittance_lut_size: s.transmittance_lut_size,
            multiscattering_lut_size: s.multiscattering_lut_size,
            sky_view_lut_size: s.sky_view_lut_size,
            aerial_view_lut_size: s.aerial_view_lut_size,
            transmittance_lut_samples: s.transmittance_lut_samples,
            multiscattering_lut_dirs: s.multiscattering_lut_dirs,
            multiscattering_lut_samples: s.multiscattering_lut_samples,
            sky_view_lut_samples: s.sky_view_lut_samples,
            aerial_view_lut_samples: s.aerial_view_lut_samples,
            aerial_view_lut_max_distance: s.aerial_view_lut_max_distance,
            scene_units_to_m: s.scene_units_to_m,
            sky_max_samples: s.sky_max_samples,
            rendering_method: s.rendering_method as u32,
        }
    }
}

impl ExtractComponent for GpuAtmosphereSettings {
    type QueryData = Read<AtmosphereSettings>;

    type QueryFilter = (With<Camera3d>, With<Atmosphere>);

    type Out = GpuAtmosphereSettings;

    fn extract_component(item: QueryItem<'_, '_, Self::QueryData>) -> Option<Self::Out> {
        Some(item.clone().into())
    }
}

fn configure_camera_depth_usages(
    mut cameras: Query<&mut Camera3d, (Changed<Camera3d>, With<Atmosphere>)>,
) {
    for mut camera in &mut cameras {
Repository: bevyengine/bevy
File: crates/bevy_pbr/src/atmosphere/mod.rs (Rust)

Code before:
        Some(item.clone().into())
    }
}

fn configure_camera_depth_usages(
    mut cameras: Query<&mut Camera3d, (Changed<Camera3d>, With<Atmosphere>)>,
) {
    for mut camera in &mut cameras {
        camera.depth_texture_usages.0 |= TextureUsages::TEXTURE_BINDING.bits();
    }
}

/// Selects how the atmosphere is rendered. Choose based on scene scale and
/// volumetric shadow quality, and based on performance needs.
#[repr(u32)]
#[derive(Clone, Default, Reflect, Copy)]
pub enum AtmosphereMode {
    /// High-performance solution tailored to scenes that are mostly inside of the atmosphere.
    /// Uses a set of lookup textures to approximate scattering integration.
    /// Slightly less accurate for very long-distance/space views (lighting precision
    /// tapers as the camera moves far from the scene origin) and for sharp volumetric
    /// (cloud/fog) shadows.
    #[default]
    LookupTexture = 0,
    /// Slower, more accurate rendering method for any type of scene.
    /// Computes the atmosphere by raymarching and produces sharp volumetric
    /// (cloud/fog) shadows.
    /// Best for cinematic shots, planets seen from orbit, and scenes requiring
    /// accurate long-distance lighting.
    Raymarched = 1,
}


Review comment (suggestion):
```suggestion
    /// Integrates the scattering numerically with raymarching and produces sharp volumetric
```

Code after:
        Some(item.clone().into())
    }
}

fn configure_camera_depth_usages(
    mut cameras: Query<&mut Camera3d, (Changed<Camera3d>, With<Atmosphere>)>,
) {
    for mut camera in &mut cameras {
        camera.depth_texture_usages.0 |= TextureUsages::TEXTURE_BINDING.bits();
    }
}

/// Selects how the atmosphere is rendered. Choose based on scene scale and
/// volumetric shadow quality, and based on performance needs.
#[repr(u32)]
#[derive(Clone, Default, Reflect, Copy)]
pub enum AtmosphereMode {
    /// High-performance solution tailored to scenes that are mostly inside of the atmosphere.
    /// Uses a set of lookup textures to approximate scattering integration.
    /// Slightly less accurate for very long-distance/space views (lighting precision
    /// tapers as the camera moves far from the scene origin) and for sharp volumetric
    /// (cloud/fog) shadows.
    #[default]
    LookupTexture = 0,
    /// Slower, more accurate rendering method for any type of scene.
    /// Integrates the scattering numerically with raymarching and produces sharp volumetric
    /// (cloud/fog) shadows.
    /// Best for cinematic shots, planets seen from orbit, and scenes requiring
    /// accurate long-distance lighting.
    Raymarched = 1,
}
Repository: bevyengine/bevy
File: crates/bevy_post_process/src/lib.rs (Rust)

Code before:
#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")]
#![forbid(unsafe_code)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
    html_logo_url = "https://bevy.org/assets/icon.png",
    html_favicon_url = "https://bevy.org/assets/icon.png"
)]

pub mod auto_exposure;
pub mod bloom;
pub mod dof;
pub mod motion_blur;
pub mod msaa_writeback;
pub mod post_process;

use crate::{
    bloom::BloomPlugin, dof::DepthOfFieldPlugin, motion_blur::MotionBlurPlugin,
    msaa_writeback::MsaaWritebackPlugin, post_process::PostProcessingPlugin,
};
use bevy_app::{App, Plugin};

#[derive(Default)]
pub struct PostProcessPlugin;

impl Plugin for PostProcessPlugin {
    fn build(&self, app: &mut App) {
        app.add_plugins((
            MsaaWritebackPlugin,
            BloomPlugin,
            MotionBlurPlugin,
            DepthOfFieldPlugin,
            PostProcessingPlugin,
        ));
    }
}


Review comment (suggestion):
I have no idea how to solve this and this isn't a blocker but it's a bit annoying to name it this since now you need `bevy::post_process::post_process::Something`

Code after:
#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")]
#![forbid(unsafe_code)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc(
    html_logo_url = "https://bevy.org/assets/icon.png",
    html_favicon_url = "https://bevy.org/assets/icon.png"
)]

pub mod auto_exposure;
pub mod bloom;
pub mod dof;
pub mod effect_stack;
pub mod motion_blur;
pub mod msaa_writeback;

use crate::{
    bloom::BloomPlugin, dof::DepthOfFieldPlugin, effect_stack::EffectStackPlugin,
    motion_blur::MotionBlurPlugin, msaa_writeback::MsaaWritebackPlugin,
};
use bevy_app::{App, Plugin};

/// Adds bloom, motion blur, depth of field, and chromatic aberration support.
#[derive(Default)]
pub struct PostProcessPlugin;

impl Plugin for PostProcessPlugin {
    fn build(&self, app: &mut App) {
        app.add_plugins((
            MsaaWritebackPlugin,
            BloomPlugin,
            MotionBlurPlugin,
            DepthOfFieldPlugin,
            EffectStackPlugin,
        ));
    }
}