pex-renderer
pex-renderer copied to clipboard
1 view frustum culling
Fixes #1
- Add
frustumproperty to camera component - Update
frustumplanes in camera.update - Add
frustumCulledproperty to geometry component (default to true) - Add
isInFrustumto transform component - Update renderer to check for geometry in frustum
This needs an example
- create scene with lots of textured pbr non instanced high resolution cubes (something that actually has cost to render)
- use fly camera to walk around
- add toggle in GUI that would go through all geometries and toggle
frustumCulledas per API above
Birds eye view mode
- add second camera viewing scene from top (maybe as viewport in the corner?)
- draw instanced (semi transparent or red) cube for each mesh that has been culled by camera 1 (that would have to be tested manually i guess)
Example: green = in viewport, white = culled

@simonharrisco could you work on this? It would require new branch with both https://github.com/pex-gl/pex-renderer/pull/157 and https://github.com/pex-gl/pex-renderer/pull/214 merged into it