Jump to content
  • Advertisement
Sign in to follow this  
VirT

Demo: Exponential Variance Shadow Map with Mip Maps

This topic is 2518 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Demo:
Exponential Variance Shadow Map
Screenshots:

evsm1.jpg
evsm2.jpg
Docs to read:

  • What is Variance Shadow Maps
  • What is Exponential Shadow Maps
  • A lot theory, comparison and about Exponential variance shadow maps here. You can also find some information and shader code at a presentation from Bungie: Lighting Research at Bungie.
  • Integrating Realistic Soft Shadows Into Your Game Engine. PCSS - that's what we want to have but with less computation and better quality.
  • NVIDIA's shadow mapping comparison: Advanced Soft Shadow Mapping Techniques

    There are two similar techniques in the last document : VSM+SAT and CSM+MIPs. But VSM has too many artifacts, CSM works really bad and slow (don't like it at all).
    What we do is take filter size computation from PCSS + EVSM filter + possibility change it by building MIP level.

    Algorithm:

    • Render a scene at a regular Shadow Map with a MultiSampling.
    • Build first mip level for EVSM by take an avarage value of all samples. Convert depth value to EVSM value.
    • Blur first Shadow Map mip level into the second one.
    • Calculate filter size based on a current depth and several samples from the regular Shadow Map around it.
    • Based on this filter size sample EVSM texture between the first and the second mip level.

      As you can see, we don't need full mip maps chain. Two mips are enough. We get correct values using trilinear filtration between mip maps.

      Disadvantages:

      • The main is memory. You need four component float texture. And you need shadow map with multisampling also. It requires alot of memory.
      • Aliasing from a far distance or acute view angle. We use SampleLevel and a standart texture filtration doesn't work. I think you can implement it by using ddx and ddy. If you know how to do it let me know.

Share this post


Link to post
Share on other sites
Advertisement
[color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif]

Looks good can the same effect be applied in directx9 or 10? Or are you using specific DX11 shaders?

[/font][/quote]
Yes, you can use DX9 as well. My version uses MultiSampled ShadowMap, but it is not necessary.

Share this post


Link to post
Share on other sites
It's an interesting approach, and definitely worth pursuing. But you would need to figure out how to eliminate the bleeding that occurs around the arms/torso area, since it really screws up the look.

Share this post


Link to post
Share on other sites
[color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif]

But you would need to figure out how to eliminate the bleeding that occurs around the arms/torso area, since it really screws up the look.

[/font][/quote]
It's true, there are no perfect techniques.
But I think it doesn't look so bad when it has textures. It's hard to notice this bleeding with a full shading.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!