Culling offscreen meshes

Blitz3D Forums/Blitz3D Programming/Culling offscreen meshes

By using an EntityInView culling method, the same number of polys are rendered in a significantly less amount of time.


29 staticmeshes
7927 polygons
13 msecs

With this method, when I look up at the sky, staticmesh rendering takes 0 msecs, as it should. Unfortunately, I can't eliminate this surface check for polys that I want to render. With meshes that are all in view, the first triangle will be in the view, so it will only slow down meshes that are partially out of view.

The way I would really do offscreen culling is by rendering a box for each staticmesh. If the render results in a TrisRendered() value, I would force the mesh to render, otherwise hide it.