Skip to content

Commit

Permalink
how did CI manage to fail on such a PR
Browse files Browse the repository at this point in the history
  • Loading branch information
BoxyUwU committed Mar 5, 2022
1 parent abbf816 commit 2482399
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
6 changes: 3 additions & 3 deletions crates/bevy_core_pipeline/src/lib.rs
Expand Up @@ -41,7 +41,7 @@ use bevy_render::{
///
/// This color appears as the "background" color for simple apps, when
/// there are portions of the screen with nothing rendered.
#[derive(Clone, Debug)]
#[derive(Copy, Clone, Debug)]
pub struct ClearColor(pub Color);

impl Default for ClearColor {
Expand Down Expand Up @@ -355,13 +355,13 @@ pub fn extract_clear_color(
// If the clear color has changed
if clear_color.is_changed() {
// Update the clear color resource in the render world
render_world.insert_resource(clear_color.clone());
render_world.insert_resource(*clear_color);
}

// If the clear color has changed
if clear_colors.is_changed() {
// Update the clear color resource in the render world
render_world.insert_resource(clear_colors.clone());
render_world.insert_resource((&*clear_colors).clone());
}
}

Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_pbr/src/light.rs
Expand Up @@ -72,7 +72,7 @@ impl PointLight {
pub const DEFAULT_SHADOW_NORMAL_BIAS: f32 = 0.6;
}

#[derive(Clone, Debug)]
#[derive(Copy, Clone, Debug)]
pub struct PointLightShadowMap {
pub size: usize,
}
Expand Down Expand Up @@ -150,7 +150,7 @@ impl DirectionalLight {
pub const DEFAULT_SHADOW_NORMAL_BIAS: f32 = 0.6;
}

#[derive(Clone, Debug)]
#[derive(Copy, Clone, Debug)]
pub struct DirectionalLightShadowMap {
pub size: usize,
}
Expand Down
6 changes: 2 additions & 4 deletions crates/bevy_pbr/src/render/light.rs
Expand Up @@ -343,10 +343,8 @@ pub fn extract_lights(
color: ambient_light.color,
brightness: ambient_light.brightness,
});
commands.insert_resource::<ExtractedPointLightShadowMap>(point_light_shadow_map.clone());
commands.insert_resource::<ExtractedDirectionalLightShadowMap>(
directional_light_shadow_map.clone(),
);
commands.insert_resource::<ExtractedPointLightShadowMap>(*point_light_shadow_map);
commands.insert_resource::<ExtractedDirectionalLightShadowMap>(*directional_light_shadow_map);
// This is the point light shadow map texel size for one face of the cube as a distance of 1.0
// world unit from the light.
// point_light_texel_size = 2.0 * 1.0 * tan(PI / 4.0) / cube face width in texels
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_render/src/view/mod.rs
Expand Up @@ -41,7 +41,7 @@ impl Plugin for ViewPlugin {
}
}

#[derive(Clone)]
#[derive(Copy, Clone)]
/// Configuration resource for [Multi-Sample Anti-Aliasing](https://en.wikipedia.org/wiki/Multisample_anti-aliasing).
///
/// # Example
Expand Down Expand Up @@ -72,7 +72,7 @@ impl Default for Msaa {

pub fn extract_msaa(mut commands: Commands, msaa: Res<Msaa>) {
// NOTE: windows.is_changed() handles cases where a window was resized
commands.insert_resource(msaa.clone());
commands.insert_resource(*msaa);
}

#[derive(Component)]
Expand Down

0 comments on commit 2482399

Please sign in to comment.