Jump to content
  • Advertisement
Sign in to follow this  
Dizzy_exe

OpenGL problems with vsm implementation in DirectX

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

Hello all, I have been playing lately with variance shadow maps. In order to improve shadow quality I split the scene around the camera into 4 areas and in my pixel shader I choose the right split by computing the distance form the center of the screen to the current shadow pixel ( I think the technique is called cascaded shadow mapping). I have implemented this method in OpenGL and in DirectX. But in DirectX I get these weird seams when I transition from one split area to another. The shaders are identical. If I turn off VSM, the problem disappears, so I don't know if is a DirectX issue or a VSM one. Here is a screen shot of the problem: Any insight is highly appreciated.

Share this post


Link to post
Share on other sites
Advertisement
You have to make sure that when you're transforming screen coordinates to texture coordinates you offset them by -0.5 * screenDimensions.

Share this post


Link to post
Share on other sites
Thank you for your suggestion, but it didn't worked. The shadows are filtered bilinearly, so there is no need for mapping pixels to texels directly.

Share this post


Link to post
Share on other sites
Quote:
Original post by Dizzy_exe
Thank you for your suggestion, but it didn't worked. The shadows are filtered bilinearly, so there is no need for mapping pixels to texels directly.


Ahh, thats too bad. That's just what immediately pops into my head when people have trouble with OpenGL -> DX conversions.

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.

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!