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 handling of waveset bounding boxes. #287

Merged
merged 2 commits into from
Jun 23, 2024
Merged

Conversation

Hoikas
Copy link
Member

@Hoikas Hoikas commented Apr 7, 2024

See CWE's plGeometrySpans::AdjustBounds() for the source of this change. Wavesets are flattened at runtime to the water height and are perturbed along the world Z axis. The input mesh, OTOH, conforms to the bottom of the pool. This means that if we simply spit out the bounding box of the input mesh, the resulting bounding box will be too deep in the -Z direction and not contain any of the +Z displacement needed. This means that the waveset could vanish due to culling.

NOTE: A draft because I'd like to test this change against korman.

See CWE's `plGeometrySpans::AdjustBounds()` for the source of this
change. Wavesets are flattened at runtime to the water height and are
perturbed along the world Z axis. The input mesh, OTOH, conforms to the
bottom of the pool. This means that if we simply spit out the bounding
box of the input mesh, the resulting bounding box will be too deep in
the -Z direction and not contain any of the +Z displacement needed. This
means that the waveset could vanish due to culling.
@Hoikas Hoikas marked this pull request as ready for review June 23, 2024 23:34
@Hoikas
Copy link
Member Author

Hoikas commented Jun 23, 2024

After some basic testing, I think this is ready.

@zrax zrax merged commit f372a43 into H-uru:master Jun 23, 2024
8 checks passed
@Hoikas Hoikas deleted the water_bounds branch June 24, 2024 00:00
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