bevy/crates/bevy_pbr/src
Olle Lukowski 6b9cd57956
Introduce AspectRatio struct (#10368)
# Objective

- Fix an inconsistency in the calculation of aspect ratio's. 
- Fixes #10288 

## Solution

- Created an intermediate `AspectRatio` struct, as suggested in the
issue. This is currently just used in any places where aspect ratio
calculations happen, to prevent doing it wrong. In my and @mamekoro 's
opinion, it would be better if this was used instead of a normal `f32`
in various places, but I didn't want to make too many changes to begin
with.

## Migration Guide
- Anywhere where you are currently expecting a f32 when getting aspect
ratios, you will now receive a `AspectRatio` struct. this still holds
the same value.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2023-12-17 02:01:26 +00:00
..
deferred Update to wgpu 0.18 (#10266) 2023-12-14 02:45:47 +00:00
environment_map Bind group layout entries (#10224) 2023-11-28 04:00:49 +00:00
prepass Rename WorldQueryData & WorldQueryFilter to QueryData & QueryFilter (#10779) 2023-12-12 19:45:50 +00:00
render Fix BindingType import warning (#10818) 2023-12-14 18:48:20 +00:00
ssao Update to wgpu 0.18 (#10266) 2023-12-14 02:45:47 +00:00
alpha.rs bevy_reflect: FromReflect Ergonomics Implementation (#6056) 2023-06-29 01:31:34 +00:00
bundle.rs Fix a typo in DirectionalLightBundle (#9861) 2023-09-20 04:44:56 +00:00
extended_material.rs Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
fog.rs chore: use ExtractComponent derive macro for EnvironmentMapLight and FogSettings (#10191) 2023-10-19 20:18:33 +00:00
lib.rs Auto insert sync points (#9822) 2023-12-14 16:34:01 +00:00
light.rs Introduce AspectRatio struct (#10368) 2023-12-17 02:01:26 +00:00
material.rs Rename WorldQueryData & WorldQueryFilter to QueryData & QueryFilter (#10779) 2023-12-12 19:45:50 +00:00
parallax.rs bevy_reflect: FromReflect Ergonomics Implementation (#6056) 2023-06-29 01:31:34 +00:00
pbr_material.rs StandardMaterial Light Transmission (#8015) 2023-10-31 20:59:02 +00:00
wireframe.rs Register WireframeColor (#10486) 2023-11-12 17:07:15 +00:00