[Merged by Bors] - Fixing confusing near and far fields in Camera#4457
[Merged by Bors] - Fixing confusing near and far fields in Camera#4457AronDerenyi wants to merge 11 commits intobevyengine:mainfrom
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.
superdump
left a comment
There was a problem hiding this comment.
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 <robert.swain@gmail.com>
|
I just independently came to the same conclusion with my recent camera work. I think this is a good call. |
superdump
left a comment
There was a problem hiding this comment.
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
nearandfarfields from the camera and the views.Changelog
nearandfarfields from the camera and the views.ClusterFarZMode::CameraFarPlanefar z mode.Migration Guide
ClusterFarZMode::Constantshould be used with the far value instead ofClusterFarZMode::CameraFarPlane