-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Use radial distance for making LOD decisions. #67307
Conversation
Previously, only forward basis distance from the camera was used. This means that unnecessarily high LOD levels were used for objects located to the side of the camera. The distance from the camera origin is now used, independently of direction.
Remember to check the behavior when using an orthogonal camera. Most importantly, we need to make sure overly aggressive LOD levels are not forced when using an orthogonal camera. |
I tested on the models I had and it looks ok, but I didn't test the error case #54885 Maybe someone can make a video. |
Indeed, the changes look great for perspective camera, but we may need to have different behaviour for orthogonal cameras like we do for calculating distance for sorting purposes. For reference, this is what we do for object sorting
|
Orthogonal distance calculation already has different behaviour, as a result of #57419. I'm less certain about how this will work with a camera in frustum mode, though. |
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.
Looks good to me! Thanks for pointing out that this gets ignored when using orthogonal. As for frustum mode, we don't alter any of our other distance calculations yet, so I am fine leaving this as is.
Thanks! |
Might be a regression? #67479 |
Makes LOD distances use radial distance, whereas previously, only the depth forward from the camera was used as the distance. This means that unnecessarily high LOD levels were used for objects located to the side of the camera.
Fixes #54885.