Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cascaded shadow mapping tutorial has disappearing shadows #405

Open
enginmanap opened this issue Oct 27, 2024 · 0 comments
Open

Cascaded shadow mapping tutorial has disappearing shadows #405

enginmanap opened this issue Oct 27, 2024 · 0 comments

Comments

@enginmanap
Copy link

In the following part of the example:

constexpr float zMult = 10.0f;

MinZ/MaxZ is calculated based on the player perspective, but if the resulting min/max is between -1 and 0, then the operation makes the orthogonal matrix smaller than player visible area, resulting in missing shadows, only on specific view angles + positions, as resulting frustum corner has to be (-1,0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant