tec icon indicating copy to clipboard operation
tec copied to clipboard

View Frustum Culling and other basic graphics optimizations

Open Zardoz89 opened this issue 10 years ago • 2 comments

Actually we not are pruning anything to the render pipeline, and eventually we would need to not throw everything to the GPU rendering pipeline.

A first and easy optimization, is doing a view frustum culling. I have reading about doing it on GPU side with geometry shaders. Other way, is doing a collision test with the physic engine, against a box or a frustum that represents the view frustum, and only send to the GPU, the objects that are inside (I did this with BEPU with C#. But BEPU, have this implemented, so I only need to call the method and get a list of object that I need to render).

Other possible optimization is LOD. Here I have a lecture about using (again) shaders to do it on GPU, but on this case is done on OpenGL 4.0. I don't know if could be adapted to 3.3 : http://rastergrid.com/blog/2010/10/gpu-based-dynamic-geometry-lod/

Also, the voxel rendering need to fuse/prune no visible quads as it would give a abysmal rendering speed boost. I would try to put a lecture that I read a lot of time ago of a guy creating a voxel engine and doing this with a lot of explain of how does it.

Zardoz89 avatar Sep 14 '15 09:09 Zardoz89

Yep I am aware of the graphics being brute force and not smart. The goal was simply get it in and working and move on to game play systems.

It should be very straight forward what is happening and easy enough to cull in the UpdateRenderList method which populates the list of items to be rendered that frame.

adam4813 avatar Sep 14 '15 11:09 adam4813

This can be delayed until 0.2, we won't have enough geometry that we need to start culling things in 0.1.

milesrout avatar May 20 '16 20:05 milesrout