pex-renderer icon indicating copy to clipboard operation
pex-renderer copied to clipboard

1 view frustum culling

Open dmnsgn opened this issue 6 years ago • 1 comments

Fixes #1

  • Add frustum property to camera component
  • Update frustum planes in camera.update
  • Add frustumCulled property to geometry component (default to true)
  • Add isInFrustum to transform component
  • Update renderer to check for geometry in frustum

dmnsgn avatar Mar 12 '19 16:03 dmnsgn

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 frustumCulled as 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 Image from iOS (1)

@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

vorg avatar Jul 17 '19 14:07 vorg