Original Post
I keep hearing about hardware PCF sampling that is faster than doing mulitple samples yourself from say a 4x4 of 5x5 kernel. But what exactly are the names of these hardware PCF calls?
For DirectX10, Ive come across
Gather - Gets the 4 x component samples that would be used for bilinear filtering. So I assume this would be used for a 4x4 kernel. But this still requires you to average them and compute the result I believe.
But I guess you could use this multiple times for larger kernels.
SampleCmp - This sounds like it just does the compare for you on a 1x1 kernel, where you pass in the depth you want to compare against. But then it says :
So I assume if the sampler you provide is set to D3D10_FILTER_MIN_MAG_MIP_LINEAR you'll get bi-linear filtering. So a 4x4 kernel AND it will perform the compare for you to.
What is there for DirectX9?
For DirectX10, Ive come across
Gather - Gets the 4 x component samples that would be used for bilinear filtering. So I assume this would be used for a 4x4 kernel. But this still requires you to average them and compute the result I believe.
float4 4Reds = Gather( Sampler, Texture );float Average = ( 4Reds.x + 4Reds.y + 4Reds.z + 4Reds.w ) / 4;float Result = Compare( Average, Depth );But I guess you could use this multiple times for larger kernels.
SampleCmp - This sounds like it just does the compare for you on a 1x1 kernel, where you pass in the depth you want to compare against. But then it says :
Quote:
Comparison filtering provides a basic filtering operation that is useful for percentage-closer-depth filtering.
So I assume if the sampler you provide is set to D3D10_FILTER_MIN_MAG_MIP_LINEAR you'll get bi-linear filtering. So a 4x4 kernel AND it will perform the compare for you to.
What is there for DirectX9?