branchrust_reboot/main/tracespheres_optimcancel
17 Commits over 0 Days - ∞cph!
Bugfix: VerifyRays/Spheres - early out if passed empty command set
Fixes exceptions when shooting
Tests: shot ak on Craggy in editor
Clean: remove hacky testing code
Tests: none, trivial change
Optim: GamePhysics.Trace - replace sort with a serial scan
- added unit tests and perf tests
In existing perf tests scene complexity is not enough, but expecting to be a minor improvement in real world.
Tests: unit tests
Optim: replicate TraceRays optims to TraceSpheres/-Unordered
TraceSpheres now scales better and earlier than it's serial counterpart:
* TraceSphereUnordered vs TraceSpheresUnordered: 128 - 0.57ms vs 0.3ms; 1024 - 5.1ms vs 1.38ms; 8196 - 43ms vs 9.9ms
* TraceSphere vs TraceSpheres: 128 - 0.64ms vs 0.44ms; 1024 - 5.6ms vs 2.2ms; 2048 - 11ms vs 4ms
Tests: unit tests
Bugfix: veeeeery rare out of bounds access when Unity returns invalid hit
Tests: none, don't have a unit test for that
Update: GamePhysics.TraceSpheres - add ignore entity support
Tests: ran unit tests
Update(tests): add TraceSpheres and TraceSpheresUnordered unit tests
- get rid of old TestSpheres test, didn't spawn base entities
Tests: ran new unit tests, some are failing as expected
Update: expanded GamePhysics.Perf tests with spheres (batched and serial)
- Fixed a perf bug of TestTraceRay causing it to do too much sorting
- Further refactored & generalized code
At 128 spheres, batched and serial seem to cost the same - going to continue moving ray optims across after I add unit tests
Tests: ran perf tests, numbers within expectation
Clean: more refactoring of unit tests in Test.GamePhysics
Tests: ran perf tests
Clean: take out perf test measuring code into helper Utils class
Tests: ran unit tests
Clean: leave a note why we're not running water traces and raycs concurrently
Tests: none, trivial change
Update: remove TestLineOfSightBatched unit test as we never implemented the batched version (I think?)
Tests: ran all GamePhysics.UnitTests - now they all green