Skip to content

Revert "Fix rounding bug in camera projection (#16828)"#17592

Merged
alice-i-cecile merged 1 commit intobevyengine:mainfrom
hukasu:revert_16828
Feb 2, 2025
Merged

Revert "Fix rounding bug in camera projection (#16828)"#17592
alice-i-cecile merged 1 commit intobevyengine:mainfrom
hukasu:revert_16828

Conversation

@hukasu
Copy link
Copy Markdown
Contributor

@hukasu hukasu commented Jan 28, 2025

This reverts commit ae52222.

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
image

projection_zoom example
image

camera_sub_view example
image

custom_primitives example
image

#16773 code
image

@mockersf
Copy link
Copy Markdown
Member

It would be great if more people could confirm they don't reproduce the issues mentioned in #16773 with this PR. This may be config dependent

@hukasu
Copy link
Copy Markdown
Contributor Author

hukasu commented Jan 28, 2025

if it may be config dependent than it is best that i leave this here

2025-01-28T23:36:45.869167Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Linux (NixOS 24.11)", kernel: "6.6.69", cpu: "Intel(R) Core(TM) i7-14700KF", core_count: "20", memory: "31.2 GiB" }    
2025-01-28T23:36:46.033093Z  INFO bevy_render::renderer: AdapterInfo { name: "NVIDIA GeForce RTX 4060 Ti", vendor: 4318, device: 10243, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "565.77", backend: Vulkan }

@mockersf
Copy link
Copy Markdown
Member

mockersf commented Feb 2, 2025

I would like to merge this if we don't get more feedback, people will probably react more if they see the issue back in main

@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Feb 2, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Feb 2, 2025
Merged via the queue into bevyengine:main with commit 55283bb Feb 2, 2025
@hukasu hukasu deleted the revert_16828 branch February 2, 2025 19:48
mrchantey pushed a commit to mrchantey/bevy that referenced this pull request Feb 4, 2025
…vyengine#17592)

This reverts commit ae52222.

# Objective

Fixes bevyengine#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 bevyengine#16856 and code from bevyengine#16773

## Showcase
`orthographic` example

![image](https://github.com/user-attachments/assets/d3bb1480-5908-4427-b1f2-af8a5c411745)

`projection_zoom` example

![image](https://github.com/user-attachments/assets/e560c81b-db8f-44f0-91f4-d6bae3ae7f32)

`camera_sub_view` example

![image](https://github.com/user-attachments/assets/615e9eb8-f4e5-406a-b98a-501f7d652145)

`custom_primitives` example

![image](https://github.com/user-attachments/assets/8fd7702e-07e7-47e3-9510-e247d268a3e7)

bevyengine#16773 code

![image](https://github.com/user-attachments/assets/1b759e90-6c53-4279-987e-284518db034b)
holmes-software pushed a commit to holmes-software/bevy that referenced this pull request Feb 5, 2025
…vyengine#17592)

This reverts commit ae52222.

# Objective

Fixes bevyengine#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 bevyengine#16856 and code from bevyengine#16773

## Showcase
`orthographic` example

![image](https://github.com/user-attachments/assets/d3bb1480-5908-4427-b1f2-af8a5c411745)

`projection_zoom` example

![image](https://github.com/user-attachments/assets/e560c81b-db8f-44f0-91f4-d6bae3ae7f32)

`camera_sub_view` example

![image](https://github.com/user-attachments/assets/615e9eb8-f4e5-406a-b98a-501f7d652145)

`custom_primitives` example

![image](https://github.com/user-attachments/assets/8fd7702e-07e7-47e3-9510-e247d268a3e7)

bevyengine#16773 code

![image](https://github.com/user-attachments/assets/1b759e90-6c53-4279-987e-284518db034b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

Regression with custom projections

3 participants