Skip to content

Commit

Permalink
Derive Reflect for Exposure (#11907)
Browse files Browse the repository at this point in the history
# Objective

- Don't crash when loading a scene with a camera

## Solution

- Derive Reflect for Exposure

Closes #11905
  • Loading branch information
IceSentry authored Feb 16, 2024
1 parent 80f2ee2 commit f81aa64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/bevy_render/src/camera/camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ pub struct ComputedCameraValues {
/// How much energy a `Camera3d` absorbs from incoming light.
///
/// <https://en.wikipedia.org/wiki/Exposure_(photography)>
#[derive(Component)]
#[derive(Component, Clone, Copy, Reflect)]
#[reflect_value(Component)]
pub struct Exposure {
/// <https://en.wikipedia.org/wiki/Exposure_value#Tabulated_exposure_values>
pub ev100: f32,
Expand Down
1 change: 1 addition & 0 deletions crates/bevy_render/src/camera/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ impl Plugin for CameraPlugin {
.register_type::<ClearColorConfig>()
.register_type::<CameraRenderGraph>()
.register_type::<CameraMainTextureUsages>()
.register_type::<Exposure>()
.init_resource::<ManualTextureViews>()
.init_resource::<ClearColor>()
.add_plugins((
Expand Down

0 comments on commit f81aa64

Please sign in to comment.