Skip to content

Commit

Permalink
Fix inverted aspect ratio
Browse files Browse the repository at this point in the history
Co-authored-by: François <mockersf@gmail.com>
  • Loading branch information
rparrett and mockersf committed Feb 23, 2023
1 parent 4aa7198 commit bd50e4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/bevy_pbr/src/light.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ pub fn update_directional_light_cascades(
{
Some((
entity,
projection.area.height() / projection.area.width(),
projection.area.width() / projection.area.height(),
std::f32::consts::FRAC_PI_4,
transform.compute_matrix(),
))
Expand Down
7 changes: 5 additions & 2 deletions examples/3d/orthographic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,11 @@ fn setup(
..default()
});
// light
commands.spawn(PointLightBundle {
transform: Transform::from_xyz(3.0, 8.0, 5.0),
commands.spawn(DirectionalLightBundle {
directional_light: DirectionalLight {
shadows_enabled: true,
..default()
},
..default()
});
}

0 comments on commit bd50e4d

Please sign in to comment.