-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix possible divide by zero explode edge case
Only currently apparent with vulkan but could also exist with d3d in the right circumstances: With vulkan mesh drawing, the axis construction lines would disappear even when all explode params are zero. This is almost certainly down to normalizing a vertex offset that's coincident with 'exploderCentre', producing INFs/NaNs. Hlsl would return explodeDir to zero by multiplying with a zero 'exploderScale' but vulkan doesn't seem to do that... TLDR: Avoid dividing by zero. Also added some lines between MeshUBOData fields to better see padding requirements, since I wondered if I'd misaligned something.
- Loading branch information
Showing
3 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters