   Geometry culling
  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   
  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.   ;  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.   