This reverts commit ae522225cd
.
# Objective
Fixes #16856
## Solution
Remove rounding from `OrthographicProjection::update`, which was causing
the center of the orthographic projection to be off center.
## Testing
Ran the examples mentioned on #16856 and code from #16773
## Showcase
`orthographic` example

`projection_zoom` example

`camera_sub_view` example

`custom_primitives` example

#16773 code

This commit is contained in:
parent
756948e311
commit
55283bb115
@ -637,8 +637,8 @@ impl CameraProjection for OrthographicProjection {
|
||||
ScalingMode::Fixed { width, height } => (width, height),
|
||||
};
|
||||
|
||||
let origin_x = (projection_width * self.viewport_origin.x).round();
|
||||
let origin_y = (projection_height * self.viewport_origin.y).round();
|
||||
let origin_x = projection_width * self.viewport_origin.x;
|
||||
let origin_y = projection_height * self.viewport_origin.y;
|
||||
|
||||
self.area = Rect::new(
|
||||
self.scale * -origin_x,
|
||||
|
Loading…
Reference in New Issue
Block a user