VSM Shadow

Hi guys.
I’m posting concerning shadow implementation. I have try to implement soft shadows with PCF. I have test with 2 “map” size and i haven’t got the result that i was expecting.

Here its a map of 5X6 cube

Here its a map of 10X12 cube

Someone told me that i should use VSM so i did try it.
Here it’s the 5x6 map with VSM

As you can see, it’s a bit weird sometimes. How can i make it more pretty?

Even if actually my VSM map look weird, i want to continue with this technique and implemented bigger map. I will use cascading shadow map. Someone have a good tutorial or project or papers about that subject that could help me?

Thank you.

Which face do you render when doing VSM ? You should render back faces. It is the only way to avoid light back faces rendered in shadow (and so having such artifacts). Also try to change the sampling value if you already did the first.

Shadow-mapping is a technique based on images. Then you can have very nice shadows or face strange things depending on various things, for example having to alterate a bit the z value of the depth-map texture coordinates. Some others even have to modify the bias matrix.

If you want a more perfect technique for shadowing, then have a look at shadow volume. It is a technique based on geometry, so you need to know the geometry of each object casting shadows.

Concerning cascading sm, I don’t have any link near me, but google is your friend.

Shadow volume does not scale well with geometry complexity.
VSM should give better results than what you have, are you sure you do each step correctly ?

I’m pretty sure i’m doing it the right way. Today, i will play a bit with all the parameter and try to have a better effect. If i don’t come up with something good, i will post you a sample of my source so you can take a look at what i’m doing. Than you

Okay i have fix my VSM

Now i want to implement cascading shadow or split- paralell. Shoud i implement this first or do multitexturing before? (like put a brick texture on the wall)

thank you