Shadow filtering: PCF better than VSM?

Hi guys,

I performed some tests in which I implemented some shadow filtering techniques: PCF and VSM.

I’m really puzzled because I am getting 700 fps with a 3x3 kernel, 525 fps with a 9x9 kernel filter and 439 fps with a 15x15 kernel filter!

The screen resolution is full-HD and the shadow map size is 1024x1024. I used an Itel i7 @2,8 Ghz and an nvidia geForce GTX480.

Using VSM I only get a small performaqnce boost: 666 fps instead of 439.

Does this mean that, as the power of the GPUs increases, techniques like VSM will be useless because PCF will not be the bottleneck anymore?

What do you think?

Greetings.

I wouldn’t say it’s a small performance boost, that’s more than 50% more frames per second.

That’s generally true for all techniques. Choose whatever best fits your needs. If using brute force PCF works well for you, then just use it.

However, as a generic note: PCF does not provide exactly the same results as VSM. In some cases the former is better, in some cases the later.

Can I ask a follow-up question on shadow techniques. Our application is basically for highway/road constructions. So the user is creating all the data (ie difficult for us to predict). If we wanted to draw shadows to the 3D views what technique would you suggest. Speed is important but currently we render to video for drive throughs and could restrict shadows to this option if the render time was to slow. The main thing would be that the user gets good shadows without having to fiddle a lot of parameters

PCF is no silver bullet. Especially with larger kernels, you end up with oddball stuff like flat near terrain shadowing far terrain even with the light source above the ground. Crank aniso on the shadow map up to 8-12, and IIRC it gets worse – bigger integration area (that’s for a standard shadow map with no MIPs too).

Sounds like your camera is at or near the ground, potentially with a large depth range toward the horizon.

Would suggest looking at Cascaded Shadow Maps aka Parallel-split Shadow Maps. This gives you finer-spatial res shadows up-close and courser-spatial res shadows further away (like you need with a perspective frustum). Can be applied fairly orthogonally with filtering techniques such as PCF, VSM, etc.