BVH: keep absent children behind real hits #230
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!230
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/230/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@space-de on GitHub · 2026-11-24 22:50 UTC · original
space-de:fix/bvh-absent-child-sort→main· +6 −2 · 2 files · 4 commits · closed without mergingFixes #173.
When a BVH child pointer is
NONE, its stored bounds can still intersect the ray. The current slab test then gives that absent child a finite distance, so the sorting network can place theNONEsentinel ahead of a real hit. Traversal that stops at the first absent child can miss valid geometry.Require a present child in both implementations: the CPU reference and the matching DXIL emitter. Absent children now remain misses with infinite distance, so sorting keeps valid intersections ahead of them.
Checks
cargo check -p victory-shader --lockedcargo clippy -p victory-shader --locked -- -D warningsrustfmt --edition 2024 --check crates/victory-shader/src/bvh.rs crates/victory-shader/src/emit/intersect.rsgit diff --checkNo in-game run was performed. This is a BVH traversal correctness fix; no frame-rate improvement is claimed.
@kaayzouee on GitHub · 2026-11-25 01:23 UTC · original
Duplicate of #213?
Pull request closed