Jump to content

Multisampled Shadowmaps


Josh

2,438 views

 Share

Because variance shadow maps allow us to store pre-blurred shadow maps it also allows us to take advantage of multipled textures. MSAA is a technique that renders extra pixels around the target pixel and averages the results. This can help bring out fine lines that are smaller than a pixel onscreen, and it also greatly reduces jagged edges. I wanted to see how well this would work for rendering shadow maps, and to see if I could reduce the ragged edge appearance that shadow maps are sometimes prone to.

Below is the shadow rendered at 1024x1024 with no multisampling and a 3x3 blur:

1x.png.6d51e51629b6cdf2931c46946517de08.png

Using a 4X MSAA texture eliminates the appearance of jagged edges in the shadow:

4x.png.22830ed4c50e681ca661828f92a3b523.png

Here they are side by side:

1994949306_shadowMSAA.png.88ce6757b8bc50be7bebcc2f5150b857.png

This is very exciting stuff because we are challenging some of the long-held limitations of real-time graphics.

 

  • Like 2
 Share

2 Comments


Recommended Comments

5 hours ago, AggrorJorn said:

How expensive is this operation?

Not very. It only gets triggered when a shadow map is redrawn and it gets downsampled into the final shadow map. And the shadow shader is cheap to draw.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...