Shaders: ignore missing BVH children before sorting #217

Closed
Flyander wants to merge 1 commit from upstream-pr/217 into main
Flyander commented 2026-11-24 22:39:22 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Flyander on 2026-11-24T22:39:22Z.


Summary

  • Ignore BVH slots whose child ID is NONE when computing and sorting box hits.
  • Add a regression case where an absent slot has an intersecting box ahead of a valid child. Confirm the real child stays first in both the CPU reference and emitted shader.

Validation

  • cargo test --locked -p victory-shader --lib --target-dir E:\Dev\victory-fork-target: 211 passed, 2 ignored. The regression test ran on the RTX 5070 Ti and WARP.
  • rustfmt --edition 2024 --check on the three changed files and git diff --check pass.
  • The workspace-wide cargo fmt --all -- --check still reports existing formatting differences in unrelated files.
<!-- greyfinch-sync:fxceless/victory-fork:issue:6592834396 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/217). Originally posted by [Flyander](https://github.com/Flyander) on 2026-11-24T22:39:22Z. --- ## Summary - Ignore BVH slots whose child ID is `NONE` when computing and sorting box hits. - Add a regression case where an absent slot has an intersecting box ahead of a valid child. Confirm the real child stays first in both the CPU reference and emitted shader. ## Validation - `cargo test --locked -p victory-shader --lib --target-dir E:\Dev\victory-fork-target`: 211 passed, 2 ignored. The regression test ran on the RTX 5070 Ti and WARP. - `rustfmt --edition 2024 --check` on the three changed files and `git diff --check` pass. - The workspace-wide `cargo fmt --all -- --check` still reports existing formatting differences in unrelated files.
upstream-sync closed this pull request 2026-11-24 23:09:14 +00:00
Flyander commented 2026-11-24 23:09:39 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Flyander on 2026-11-24T22:46:51Z.


Closing this as a duplicate of #213, which addresses the same missing-child sort-key bug from #173 and has broader parity coverage for both node widths plus the ray-tracing docs. #213 is the better single upstream implementation.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7146636130 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/217#issuecomment-7146636130). Originally posted by [Flyander](https://github.com/Flyander) on 2026-11-24T22:46:51Z. --- Closing this as a duplicate of #213, which addresses the same missing-child sort-key bug from #173 and has broader parity coverage for both node widths plus the ray-tracing docs. #213 is the better single upstream implementation.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
fxceless/victory-fork!217
No description provided.