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

Cull fixes and optimizations #44656

Merged
merged 1 commit into from
Dec 24, 2020

Conversation

reduz
Copy link
Member

@reduz reduz commented Dec 24, 2020

Bugsquad edit: Follow-up to #44623.

@lawnjelly
Copy link
Member

I've just done a test and I'm not sure the quantized version here is working as well as it could, I'm getting about 4 in 20 updates being a noop, versus 19 in 20 with a naive expansion of 0.5 on each axis in my test case (scaled from -10.0 to +10 on each axis with random cubes).

Maybe the quantize is scale sensitive, I will look further.

@reduz
Copy link
Member Author

reduz commented Dec 24, 2020

Feel free to continue researching, I wont do a lot more changes to BVH

@reduz reduz merged commit 545c894 into godotengine:master Dec 24, 2020
@@ -107,6 +107,9 @@ class AABB {
Variant intersects_segment_bind(const Vector3 &p_from, const Vector3 &p_to) const;
Variant intersects_ray_bind(const Vector3 &p_from, const Vector3 &p_dir) const;

_FORCE_INLINE_ void quantize(float p_unit);
_FORCE_INLINE_ AABB quantized(float p_unit) const;
Copy link
Member

Choose a reason for hiding this comment

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

Should be real_t.

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