Bluring Dynamic Variance Shadow Maps

Started by
12 comments, last by jbizzler 17 years ago
That was 1024^2, just to get nice quality. However 512^2 and 3 slices looks pretty darn good with even just 4x MSAA on the shadow map (G80 supports MSAA for fp32 render targets!)... even 2 slices of 512^2 looks pretty nice IMHO, although a bit less detailed naturally. Probably 512^2 with 3 slices is the best trade-off right now on the G80, although it will of course depend on the scene.

I'll be posting the demo binary publicly soon so anyone with a G80 and Vista (D3D10) is welcome to play around with it: pretty much every option is exposed in the UI.
Advertisement
I am looking forward to the demo! My upper limit is 672x672 (platform specific: this way I can get 4xMSAA) and I can double like this: 15meter, 30 meter, 60 meter and 120 meter. Usually the last one can take more. My meters are relative so they do not say a lot.
With 4xMSAA my 672 maps are like 1024 maps ... pretty cool.
Just for the record, 672 is a weird size ;)

Quote:Original post by wolf
With 4xMSAA my 672 maps are like 1024 maps ... pretty cool.

Yeah multisampling with VSMs is awesome - it makes static shots look better, but it *really* makes a huge difference in motion, completely eliminating swimming edges in many cases.

Anyways I'll be posting the demo soon... just have to clean up a few things :)
Mine's still not really working. Here's my SampleState and my horozontal blur. It works fine on the first slice, but the 2nd slice is pixellated like a traditional shadow map, and beyond that, everything is in shadow.

SamplerState Linear
{
AddressU = Clamp;
AddressV = Clamp;
Filter = MIN_MAG_MIP_LINEAR;
};

float4 PS_BlurH(PS_Blur_In input) : SV_TARGET
{
int softness = 3;
float4 output = (float4)0;
float step = 8.0f / (512.0f * BlurWidth[LightID]);

float2 tex;
for(int i = -softness; i <= softness; i++)
{
tex = input.Tex + float2(i * step, 0);
output += ShadowMap[0].Sample(Linear, tex);
}

return output / (2 * softness + 1);
}

I tried SampleLevel, and it produced the same results. The softness is actually like a 7x7 box blur, just clearer code to me, and the BlurWidth is the width of the corrosponding orthographic projection matrix.

And what are the code tags on this forum?

This topic is closed to new replies.

Advertisement