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

Fix directional light camera calculation #81

Merged
merged 1 commit into from
Apr 11, 2022
Merged

Fix directional light camera calculation #81

merged 1 commit into from
Apr 11, 2022

Conversation

HanetakaChou
Copy link

Fix directional light camera calculation

@hyv1001
Copy link
Collaborator

hyv1001 commented Apr 8, 2022

Please give a clear and concise description of what the problem is.

@HanetakaChou
Copy link
Author

It may be incorrect to calcuate the Intersection of the "frustum_bounding_box" and the "scene_bounding_box".
Some objects, which are outside the "frustum_bounding_box" but closer to the light source, may cast shadow as well.


min = glm::min(min, corner);
max = glm::max(max, corner);
glm::vec3 corner_before = extents * g_BoxOffset[i] + center;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please format code with clang-format


min = glm::min(min, corner);
max = glm::max(max, corner);
glm::vec3 corner_before = extents * g_BoxOffset[i] + center;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please format code with clang-format

@hyv1001 hyv1001 merged commit 5c438a0 into BoomingTech:main Apr 11, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants