Geometry Shaders

We are right at the lower limit (24 FPS) for the display program running a 6-head gaming card on a monster machine with just the terrain, atmospheric effects, and two copies of the same platform model.

I had a sneaky suspicion that rendering each viewport in its entirety during the “Render” method would be slower than sending all 6 projection matrices to the HLSL shaders and letting them split the geometry across viewports.

I am happy to provide some numbers now after this evening’s spike!  I applied this change just to the terrain and turned off the model rendering: 137 FPS before, 154 FPS after (a 13% increase in performance).

So, yes… it is faster. There is one big drawback… the shader wants to know how many vertices to expect coming out of the GS (I usually just run 1 viewport on my development machine).

// Geometry Shaders
void GS(triangle VSSceneOutMain In[3], inout TriangleStream TriStream)
GSSceneOutMain output = (GSSceneOutMain)0.0;

So it isn’t really worth doing right now… the bigger fish to fry is obviously the models rendering speed!

Leave a Reply