Jump to content
  • Advertisement
Sign in to follow this  
karnaltaB

(Beginner) Pcss Shadows Questions

This topic is 717 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

Hi, 

 

I am playing around with PCSS shadows in my small 3D engine (for learning purpose) but there is two things I don't understand. Probably beginner problems...

 

 

- Reading from my shadow map requiere an UV coordinate, and I add poisson disk offset to them to read surrounding pixel and try to find blockers (nVidia PCSS method). But what I don't get is how it work when the UV + Offset are greater than 1 ? It go out of the texture then ?

 

Exemple : UV = 0.54,0.74 + Offset = 0.84,0.44. I would expect poisson disk to be really small value like 0.00xx.. to read nearly surrounding pixel and not random pixel on the whole map. I probably don't get how reading texture work...

 

 

- My other problem is that the depth map I generate from the point of view of my light has a too small range so I don't find a lot of blockers (so shadow are still hard). When visualizing my shadow map in the VS debugger, all my value are between 0.998 - 1.0 (sometime event between 1 - 1 :s). Even with my clip space as tight as possible. In a particular case my near plane is 0.1f and my far plane is 20.0f, I would expect depth values a bit more expended like 0.97 - 1.0. What could influence the depth repartition when rendering my shadow map (a 32bit floating point texture). Due to that tight depth range, my PCSS offset value after having calculated blockers is really small, so I don't really get soft shadows. When debugging the sample code from nVidia, I notice that the main difference is that their depth value are more expended and so the offset value is something like 8-9 while mine is something like 0.025..

 

Thank a lot if someone can light me up ;)

Share this post


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

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!