Skip to content

Fix directional light camera calculation#81

Merged
hyv1001 merged 1 commit into
BoomingTech:mainfrom
HanetakaChou:main
Apr 11, 2022
Merged

Fix directional light camera calculation#81
hyv1001 merged 1 commit into
BoomingTech:mainfrom
HanetakaChou:main

Conversation

@HanetakaChou
Copy link
Copy Markdown

Fix directional light camera calculation

@hyv1001
Copy link
Copy Markdown
Collaborator

hyv1001 commented Apr 8, 2022

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

@HanetakaChou
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

2 participants