Skip to content
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 the separating axis theorem for tighter trace OBB culling #37

Open
dnk777 opened this issue May 2, 2019 · 1 comment
Open

Use the separating axis theorem for tighter trace OBB culling #37

dnk777 opened this issue May 2, 2019 · 1 comment

Comments

@dnk777
Copy link
Member

dnk777 commented May 2, 2019

Currently a check between a shape bounding sphere and a trace line (cylinder) is used. A prism that encloses two boxes (defined by trace extents and put at trace start/end) can be used as a tighter trace shape (rather than a cylinder). 4 or 6 planes of the prism can be chosen. Considering the fact some sides are pairwise parallel 2 or 3 dot products are to be computed for SAT tests. This approach fits use of SIMD instructions very nice given the fact we can compute/test 4 dot products in few instructions having a proper component layout.

@dnk777
Copy link
Member Author

dnk777 commented May 3, 2019

To be less vague not bounding spheres but bounding boxes of brushes and facets should be tested against these planes (as they're tighter than spheres). This requires testing 8 vertices against a plane in a general case but given plane normal signs a mask for selection of a nearest vertex from box bounds can be used (that is SIMD friendly as well).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant