Sign in to follow this  

Geometry culling

This topic is 4282 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, In my engine, I currently have a 10,000 poly test level. It runs at 220 with full physics, sound, everything and just plain texture mapped renderering. When I enable the lighting pass, with shaders, it goes down to 60 fps with 2 lights that cast shadows. If I disable the shaders of the lighting pass, and the light still calculates shadow volumes, I get 120 fps. Modifying the vertex buffer renderering function to only render 1 triangle per lighting pass gives me 120 fps. What is the easiest way for me to cull the geometry of my vertex buffers? I'm thinking of something to do with index buffers. I just want the shaders to be skipped, not the actual geometry skipped, since rendering the entire level in one pass, 10 times, still gives me 100+ fps. If I use clip planes, making a cube around the light and a polygon fails DirectX's internal clipping test, does it skip the shader rasterization? Thanks, Cade

Share this post


Link to post
Share on other sites
It sounds like you want some sort of material level-of-detail system, so that you can skip expensive shaders and additional passes for far-away geometry. In this case, you will probably first want to have a material framework in place that easily allows you to change the shader of a material. If you are using a state change tree, the rest should be very easy, since those changed shaders just get picked up in the tree.

I couple material-LOD with geometric-LOD and animation-LOD, so the 3 are always in-sync with each other. So, switching a node's LOD will change its source geometry, could change the shader it uses, and could change the animation detail.

Share this post


Link to post
Share on other sites
I already have a material system in place, its just that the vertex buffers are per-material and I would like them to be static. If possible, I would like to modify and use index buffers.

Share this post


Link to post
Share on other sites

This topic is 4282 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this