H-uru / libhsplasma

Cross-platform Plasma data and network library
GNU General Public License v3.0
32 stars 30 forks source link

Fix handling of waveset bounding boxes. #287

Closed Hoikas closed 5 months ago

Hoikas commented 7 months ago

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.

Hoikas commented 5 months ago

After some basic testing, I think this is ready.