Jump to content
  • Advertisement
Sign in to follow this  
sunrisefe

shadow in large scene

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

In forest scene with sunlight, which shadow algorithm is fit for realtime rendering. I know if the scene is large,it's impossible to render with shadow in real time, so I try to render the near scene with shadow and other part with fake technique. The shadow map algorithm render the scene twice to add real-time shadow, but it designed for spotlight, how to modify to parallel light(sunlight)? Or other algorithm?

Share this post


Link to post
Share on other sites
Advertisement
Shadow maps aren't designed for spot lights at all, just use an orthogonal projection matrix built from the light direction.
As for the large scene issues, you could try to use cascaded shadow maps

Share this post


Link to post
Share on other sites
"Shadow maps aren't designed for spot lights at all, just use an orthogonal projection matrix built from the light direction."

you mean only to change D3DXMatrixPerspectiveFovLH to D3DXMatrixOrthoLH, but how to specity the light position? Any demo?



Share this post


Link to post
Share on other sites
Quote:
Original post by sunrisefe
you mean only to change D3DXMatrixPerspectiveFovLH to D3DXMatrixOrthoLH, but how to specity the light position?
A directional light doesn't have a position, per se. Just position your orthogonal shadow camera a suitable distance away from the scene, in the given direction.

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!