shadow in large scene

Started by
3 comments, last by sunrisefe 14 years, 5 months ago
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?
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
"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?



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.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

I see, thank you.

This topic is closed to new replies.

Advertisement