Skip to content

Commit 71623b2

Browse files
committed
Update lighting as it changed in the last Bevy release to be darker by default
1 parent a3e6ec2 commit 71623b2

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bevy_fps_controller"
3-
version = "0.2.4"
3+
version = "0.2.5"
44
edition = "2021"
55
authors = ["bevy_fps_controller"]
66
repository = "https://github.com/qhdwight/bevy_fps_controller"

examples/minimal.rs

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use std::f32::consts::TAU;
22

33
use bevy::{
4-
gltf::Gltf,
5-
gltf::{GltfMesh, GltfNode},
4+
gltf::{Gltf, GltfMesh, GltfNode},
65
math::Vec3Swizzles,
76
prelude::*,
7+
render::camera::Exposure,
88
window::CursorGrabMode,
99
};
1010
use bevy_rapier3d::prelude::*;
@@ -17,7 +17,7 @@ fn main() {
1717
App::new()
1818
.insert_resource(AmbientLight {
1919
color: Color::WHITE,
20-
brightness: 0.5,
20+
brightness: 10000.0,
2121
})
2222
.insert_resource(ClearColor(Color::hex("D4F5F5").unwrap()))
2323
.insert_resource(RapierConfiguration::default())
@@ -40,7 +40,7 @@ fn setup(mut commands: Commands, mut window: Query<&mut Window>, assets: Res<Ass
4040

4141
commands.spawn(DirectionalLightBundle {
4242
directional_light: DirectionalLight {
43-
illuminance: 6000.0,
43+
illuminance: light_consts::lux::FULL_DAYLIGHT,
4444
shadows_enabled: true,
4545
..default()
4646
},
@@ -96,6 +96,7 @@ fn setup(mut commands: Commands, mut window: Query<&mut Window>, assets: Res<Ass
9696
fov: TAU / 5.0,
9797
..default()
9898
}),
99+
exposure: Exposure::SUNLIGHT,
99100
..default()
100101
},
101102
RenderPlayer { logical_entity },
@@ -115,12 +116,12 @@ fn setup(mut commands: Commands, mut window: Query<&mut Window>, assets: Res<Ass
115116
color: Color::BLACK,
116117
},
117118
)
118-
.with_style(Style {
119-
position_type: PositionType::Absolute,
120-
top: Val::Px(5.0),
121-
left: Val::Px(5.0),
122-
..default()
123-
}),
119+
.with_style(Style {
120+
position_type: PositionType::Absolute,
121+
top: Val::Px(5.0),
122+
left: Val::Px(5.0),
123+
..default()
124+
}),
124125
);
125126
}
126127

0 commit comments

Comments
 (0)