-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Fix occlusion culling for double builds by enforcing float conversion for Embree. #98770
Conversation
c13d712
to
1295d29
Compare
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.
Tested locally, it works as expected.
However, occlusion culling is only functional when you're not too far away from the world origin. I wonder if some form of origin shifting can be used, so that occlusion culling keeps working regardless of where you are.
Single-precision builds still work as usual.
At the origin
Far away from the origin (10 million units)
This is still an improvement over what we have now, so I'd say it's good to merge.
1295d29
to
4089a6c
Compare
I removed some old code I missed when switching to the new method |
I don't see any way to implement origin shifting that won't rely on runtime baking, which at least at the moment isn't feasible |
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.
Makes sense to me.
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.
Great work. I like this better than using the marshall function like we discussed in the rendering meeting. It should be lower overhead for doubles builds
Thanks! |
Fixes #94638
Embree does not support double precision for its geometry buffer. I therefore created a simple float struct to force the conversion from double to float.