-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
bevy_render::Frustum should live in bevy_math #13878
Copy link
Copy link
Closed
Labels
A-GizmosVisual editor and debug gizmosVisual editor and debug gizmosA-MathFundamental domain-agnostic mathematical operationsFundamental domain-agnostic mathematical operationsA-RenderingDrawing game state to the screenDrawing game state to the screenC-Code-QualityA section of code that is hard to understand or changeA section of code that is hard to understand or changeC-FeatureA new feature, making something new possibleA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!
Metadata
Metadata
Assignees
Labels
A-GizmosVisual editor and debug gizmosVisual editor and debug gizmosA-MathFundamental domain-agnostic mathematical operationsFundamental domain-agnostic mathematical operationsA-RenderingDrawing game state to the screenDrawing game state to the screenC-Code-QualityA section of code that is hard to understand or changeA section of code that is hard to understand or changeC-FeatureA new feature, making something new possibleA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!
What problem does this solve or what need does it fill?
Our existing
Frustumtype is used for computing what cameras should see.However, as this existed before the addition of our mathematical primitive types, it a) doesn't live in
bevy_mathlike the others and b) is missing all of the standard expected functionality for it.What solution would you like?
HalfSpaceintobevy_mathunchanged.Frustumintobevy_mathunchanged.1 and 2 should be done in a single PR. 3 should be done in a follow-up.
We can later add all of the other weird and wonderful things (random sampling, meshability) to these types if people think it's worthwhile, but those steps are the key things.
Once things are moved, we can look into changing naming, representation and so on. Those should be done in tightly scoped PRs, with aggressive benchmarking for frustrum culling performance. This is directly in the rendering hot loop: changes here have a high impact, for both better and worse.
Additional context
Raised on Discord. @superdump gave us rendering's blessing, as long as we don't regress performance.
The remaining bevy_render::primitives types should be moved / consolidated eventually, but gizmos for frustums is the motivating requirement here.