mirror of
https://github.com/bevyengine/bevy
synced 2024-09-20 14:32:06 +00:00
implement Reflect
for Fxaa
(#7527)
# Objective - public components and resources should implement `Reflect` if possible ## Solution - derive `Reflect`
This commit is contained in:
parent
724b36289c
commit
17ed41d707
1 changed files with 7 additions and 3 deletions
|
@ -3,7 +3,9 @@ use bevy_app::prelude::*;
|
|||
use bevy_asset::{load_internal_asset, HandleUntyped};
|
||||
use bevy_derive::Deref;
|
||||
use bevy_ecs::prelude::*;
|
||||
use bevy_reflect::TypeUuid;
|
||||
use bevy_reflect::{
|
||||
std_traits::ReflectDefault, FromReflect, Reflect, ReflectFromReflect, TypeUuid,
|
||||
};
|
||||
use bevy_render::{
|
||||
extract_component::{ExtractComponent, ExtractComponentPlugin},
|
||||
prelude::Camera,
|
||||
|
@ -19,7 +21,8 @@ mod node;
|
|||
|
||||
pub use node::FxaaNode;
|
||||
|
||||
#[derive(Eq, PartialEq, Hash, Clone, Copy)]
|
||||
#[derive(Reflect, FromReflect, Eq, PartialEq, Hash, Clone, Copy)]
|
||||
#[reflect(FromReflect, PartialEq, Hash)]
|
||||
pub enum Sensitivity {
|
||||
Low,
|
||||
Medium,
|
||||
|
@ -40,7 +43,8 @@ impl Sensitivity {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Component, Clone, ExtractComponent)]
|
||||
#[derive(Reflect, FromReflect, Component, Clone, ExtractComponent)]
|
||||
#[reflect(Component, FromReflect, Default)]
|
||||
#[extract_component_filter(With<Camera>)]
|
||||
pub struct Fxaa {
|
||||
/// Enable render passes for FXAA.
|
||||
|
|
Loading…
Reference in a new issue