-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - Fixing confusing near and far fields in Camera #4457
Conversation
…e far plane from the camera. Since the camera's far plane was an arbitrary number not derived from the projection, ClusterFarZMode::Constant can be used instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please test the many_lights
example with a 3D orthographic camera and log the appropriate near value as extracted from the orthographic projection to check it is correct. :)
Fixed the near value calculation and added comments Co-authored-by: Robert Swain <[email protected]>
I just independently came to the same conclusion with my recent camera work. I think this is a good call. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a shame to have to remove the CameraFarPlane option, but it's easy enough to configure a constant far plane instead if you need it.
no objection from me. |
bors r+ |
# Objective - Fixes #4456 ## Solution - Removed the `near` and `far` fields from the camera and the views. --- ## Changelog - Removed the `near` and `far` fields from the camera and the views. - Removed the `ClusterFarZMode::CameraFarPlane` far z mode. ## Migration Guide - Cameras no longer accept near and far values during initialization - `ClusterFarZMode::Constant` should be used with the far value instead of `ClusterFarZMode::CameraFarPlane`
# Objective - Fixes bevyengine#4456 ## Solution - Removed the `near` and `far` fields from the camera and the views. --- ## Changelog - Removed the `near` and `far` fields from the camera and the views. - Removed the `ClusterFarZMode::CameraFarPlane` far z mode. ## Migration Guide - Cameras no longer accept near and far values during initialization - `ClusterFarZMode::Constant` should be used with the far value instead of `ClusterFarZMode::CameraFarPlane`
How do you migrate this if you were previously using .near field |
What were you using it for? |
# Objective - Fixes bevyengine#4456 ## Solution - Removed the `near` and `far` fields from the camera and the views. --- ## Changelog - Removed the `near` and `far` fields from the camera and the views. - Removed the `ClusterFarZMode::CameraFarPlane` far z mode. ## Migration Guide - Cameras no longer accept near and far values during initialization - `ClusterFarZMode::Constant` should be used with the far value instead of `ClusterFarZMode::CameraFarPlane`
# Objective - Fixes bevyengine#4456 ## Solution - Removed the `near` and `far` fields from the camera and the views. --- ## Changelog - Removed the `near` and `far` fields from the camera and the views. - Removed the `ClusterFarZMode::CameraFarPlane` far z mode. ## Migration Guide - Cameras no longer accept near and far values during initialization - `ClusterFarZMode::Constant` should be used with the far value instead of `ClusterFarZMode::CameraFarPlane`
Objective
Solution
near
andfar
fields from the camera and the views.Changelog
near
andfar
fields from the camera and the views.ClusterFarZMode::CameraFarPlane
far z mode.Migration Guide
ClusterFarZMode::Constant
should be used with the far value instead ofClusterFarZMode::CameraFarPlane