Jump to content

  • Log In with Google      Sign In   
  • Create Account


Demo: Exponential Variance Shadow Map with Mip Maps


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 VirT   Members   -  Reputation: 104

Like
3Likes
Like

Posted 23 January 2012 - 01:02 PM

Demo:
Exponential Variance Shadow Map
Screenshots:

Posted Image
Posted Image
Docs to read: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.


Sponsor:

#2 Frenetic Pony   Members   -  Reputation: 1231

Like
0Likes
Like

Posted 23 January 2012 - 09:12 PM

Interesting, but the change from hard to soft shadow filtering is extremely abrupt and looks fairly jarring.

#3 toasterthegamer   Members   -  Reputation: 204

Like
0Likes
Like

Posted 24 January 2012 - 06:24 PM

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

Thanks,
-Toaster

#4 VirT   Members   -  Reputation: 104

Like
0Likes
Like

Posted 25 January 2012 - 06:53 AM

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

Yes, you can use DX9 as well. My version uses MultiSampled ShadowMap, but it is not necessary.

#5 MJP   Moderators   -  Reputation: 10670

Like
0Likes
Like

Posted 25 January 2012 - 12:09 PM

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.

#6 VirT   Members   -  Reputation: 104

Like
0Likes
Like

Posted 26 January 2012 - 07:21 AM

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.

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS