From ecdd284b0edd4ecb8b323c5026366e084ac08780 Mon Sep 17 00:00:00 2001 From: Sludge <96552222+SludgePhD@users.noreply.github.com> Date: Wed, 28 Feb 2024 04:22:08 +0100 Subject: [PATCH] Register `fxaa::Sensitivity` and derive `Debug` (#12167) # Objective - More reflection ## Solution - More. Reflection. (not sure what bevy's policy on `derive(Debug)` is given that reflection already lets you accomplish something largely equivalent; maybe `derive(Reflect)` should generate a `Debug` impl that goes through `Reflect::debug` unless you opt out?) --- crates/bevy_core_pipeline/src/fxaa/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_core_pipeline/src/fxaa/mod.rs b/crates/bevy_core_pipeline/src/fxaa/mod.rs index e65579c5b4273..bae09b4467c15 100644 --- a/crates/bevy_core_pipeline/src/fxaa/mod.rs +++ b/crates/bevy_core_pipeline/src/fxaa/mod.rs @@ -27,7 +27,7 @@ mod node; pub use node::FxaaNode; -#[derive(Reflect, Eq, PartialEq, Hash, Clone, Copy)] +#[derive(Debug, Reflect, Eq, PartialEq, Hash, Clone, Copy)] #[reflect(PartialEq, Hash)] pub enum Sensitivity { Low, @@ -86,7 +86,7 @@ impl Plugin for FxaaPlugin { fn build(&self, app: &mut App) { load_internal_asset!(app, FXAA_SHADER_HANDLE, "fxaa.wgsl", Shader::from_wgsl); - app.register_type::(); + app.register_type::().register_type::(); app.add_plugins(ExtractComponentPlugin::::default()); let Ok(render_app) = app.get_sub_app_mut(RenderApp) else {