-
-
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] - Check for NaN in Camera::world_to_screen()
#3268
Conversation
CI error should be fixed (#3269) if you rebase on main |
The |
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.
Could you also do the same fix on pipelined/bevy_render2/src/camera/camera.rs
?
This PR is the result of a bug I found while debugging an application. The
Good call, will do. |
@mockersf I've added a fix to pipelined, and changed the check to use |
bors r+ |
# Objective - Checks for NaN in computed NDC space coordinates, fixing unexpected NaN in a fallible (`Option<T>`) function. ## Solution - Adds a NaN check, in addition to the existing NDC bounds checks. - This is a helper function, and should have no performance impact to the engine itself. - This will help prevent hard-to-trace NaN propagation in user code, by returning `None` instead of `Some(NaN)`. Depends on #3269 for CI error fix.
Camera::world_to_screen()
Camera::world_to_screen()
Objective
Option<T>
) function.Solution
None
instead ofSome(NaN)
.Depends on #3269 for CI error fix.