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

GPULightmapper's triangles and their bounding box will be in-sync #52570

Merged
merged 1 commit into from
Sep 11, 2021

Conversation

williamd67
Copy link
Contributor

Previously the bounding boxes and triangles were maintained in two separate
arrays (Vectors). As the triangle vector was sorted and the bounding-box array
was not , the order of both arrays differed. This meant that the index in one
was different than the other, which caused lookup issues.

To prevent this, the bounding-box is now part of the triangle structure so that
there is a single structure that cannot become out-of-sync anymore.

Previously the bounding boxes and triangles were maintained in two separate
arrays (Vectors). As the triangle vector was sorted and the bounding-box array
was not , the order of both arrays differed. This meant that the index in one
was different than the other, which caused lookup issues.

To prevent this, the bounding-box is now part of the triangle structure so that
there is a single structure that cannot become out-of-sync anymore.
@williamd67
Copy link
Contributor Author

See this comment for some examples.

Copy link
Contributor

@JFonS JFonS left a comment

Choose a reason for hiding this comment

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

Nice catch, the fix looks good :)

@clayjohn clayjohn merged commit 80aba79 into godotengine:master Sep 11, 2021
@clayjohn
Copy link
Member

Thanks!

@williamd67 williamd67 deleted the GPULightmapper-improvements branch September 12, 2021 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants