Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: Shadow filtering: PCF better than VSM?

Hybrid View

  1. #1
    Junior Member Regular Contributor
    Join Date
    Dec 2000
    Location
    Almazora, Spain
    Posts
    104

    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.
    MeTaL WiLL NeVeR DiE!!!!!

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Dec 2007
    Location
    Hungary
    Posts
    947

    Re: Shadow filtering: PCF better than VSM?

    Quote Originally Posted by Sansus
    Using VSM I only get a small performaqnce boost: 666 fps instead of 439.
    I wouldn't say it's a small performance boost, that's more than 50% more frames per second.

    Quote Originally Posted by Sansus
    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?
    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.
    Disclaimer: This is my personal profile. Whatever I write here is my personal opinion and none of my statements or speculations are anyhow related to my employer and as such should not be treated as accurate or valid and in no case should those be considered to represent the opinions of my employer.
    Technical Blog: http://www.rastergrid.com/blog/

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    785

    Re: Shadow filtering: PCF better than VSM?

    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

  4. #4
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    2,892

    Re: Shadow filtering: PCF better than VSM?

    Quote Originally Posted by tonyo_au
    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
    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.

  5. #5
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    2,892

    Re: Shadow filtering: PCF better than VSM?

    Quote Originally Posted by Sansus
    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?
    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).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •