View Full Version : PCF, need some info

Zulfiqar Malik
01-21-2005, 08:17 AM
I am currently working on soft shadows and i have decided to use Percentage Closer Filtering aka PCF and i am wondering what filter value to choose. Currently i am doing 4 lookups within the shadow map (something like -1, -1, -1 and 1, 1, 1), but although shadow edges look pretty soft from a distance they still look aliased when viewed from close up. I have a feeling that i am missing something in the filter or maybe the way in am doing my filtering, maybe i shouldn't hardcode the filters and calculate them dynamically using the view vector or something so that the filter can be altered when the viewer is up close to the shadowed portion. Can anyone help in this regard? I am not particularly interested in any sort of source code (although it might help), just some basic theory will do!
The second that has me worrying is that how many samples are usually appropriate to produce decent soft shadows using PCF. I heard that FutureMark's 3D Mark 2005 uses 4 samples. With my fixed filters, i get pretty decent results with 4 samples (but that up close aliasing problem is still there). Increasing the samples to 8 gives me really amazing soft shadows but the performance hit is very noticable not to mention crashing on latest ATI drivers!