Shadow Rendering and the CPU

Blacklash

Newcomer
These questions are for anyone with knowledge in this area. I am tired of wondering about it myself and decided to just ask.

I have noticed in many games you may net massive FPS gains by turning off shadows, or turning them to the lowest settings. Two examples that jump readily to mind are EQ II and Tomb Raider Legends. I can actually run EQ II at 1600x with 4xAA|16xAF and extreme quality if I degrade shadows to min. One EQ II dev has stated on the record, "All shadow work is done on the CPU in EQ II".

I think this may also be the case in many other games in addition to things like creature AI, skinning and tangent space transformations.

The performance hit on my X2 4400+ even running at 2.84 GHz is massive. I can gain a good +25 FPS in both games I have pointed out by reducing shadow work.

Now after all this babbling my question would be why is the choice often made to solely use the CPU for this work, particularly when even the strongest stripe out will not be able to put up playable frame rates using the highest, or near highest quality? Does poor coding also factor into this? Limitations of current D3D?

My uneducated guess is that these choices are made because most folks don't own flagship video cards or ones capable of assuming the duty. It's frustrating when you have something like Crossfire at your disposal and it is put to poor use or crippled by an over taxed CPU.

Any thoughts or enlightment would be appreciated.
 
Last edited by a moderator:
Your guess isn't miles off but it's not the only reason.

Typically mass market PC's delivered by DELL etc have relatively fast CPU's compared to the speed of their graphics cards. So there is a tendancy in the PC space to move work on to the CPU.

However in the case of shadows and stencil shadows in particular it's somewhat easier and potentially faster (depending on geometric complexity to do the shadow extrusions on the CPU.

Rendering the Shadows is also a significant buden on the GPU especially when multiple lights are casting shadows. Stencil shadows are extremly fillrate unfriendly and they have side effects on most hardware that makes Z compression less effective.
 
Understood.

When I think X1900 I think possible shadow map filtering with dynamic branching, ultra threaded tech and fetch 4.

I suppose for now I will continue to reduce shadows in most games. I am very interested to see what sort of performance difference I will get when moving X1900 Crossfire to be supported with an overclocked E6700.
 
Last edited by a moderator:
Everquest 2, last I checked, doesn't even use above PS 1.1. So unless they've updated the renderer, there's really not much point in trying to make use of the more modern shadowing techniques that place more of the load on the GPU.
 
However in the case of shadows and stencil shadows in particular it's somewhat easier and potentially faster (depending on geometric complexity to do the shadow extrusions on the CPU.
Beyond just geometric complexity (particularly of the scene as you may want to have dozens and dozens of scissor planes), there's just the fact that it can mean sending only the one tiny vertex format to the GPU when rendering shadow volumes.

There are also cases where it can just be nicer to use shadow maps, but I've seen cases where they can be every bit as bad if not worse than stencil shadows as far as performers go... In particular, high-res cubemap shadows for each of multiple point lights comes to mind. Though the biggest weakness with stencil shadows for me is simply that they're not sensitive to transparency (simply because that's the nature of the method itself).
 
Back
Top