fix(volumetrics): prevent zero-depth NaN flashes #990
No reviewers
Labels
No labels
Context: Bug
Context: Enhancements
Platform: Android
Platform: Linux
Platform: Web
Platform: Windows
Platform: iOS
Platform: macOS
Release
Target: CI
Target: CLI
Target: Dependency
Target: Engine
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
SakulFlee/Orbital!990
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/volumetric-zero-depth"
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?
Summary
Fixes the periodic white flashes in volumetrics and restores the AiO spotlight animation.
Root cause
The first froxel slice can be jittered to exactly zero view depth. That makes the reconstructed world position equal the camera position, so:
normalizes a zero vector and writes NaNs into the froxel texture. Depending on temporal history, the NaNs appear either as local bright model fragments or as a whole-screen flash after filtering/tonemapping.
Fix
0.01.Validation
cargo test -p orbital_renderer --all-targetspasses.cargo check --workspacewith the workspace clippy driver and-D warningspasses.rustfmt --checkpasses.Related: #986, #989.
Smart test results
Result: PASS
Scope: orbital_renderer
Reason: directly changed crates
Elapsed: 3m 51s
Workflow run
Overall: 18 tests, 18 passed, 0 failed, 0 skipped
Nextest: 18 tests, 18 passed, 0 failed, 0 skipped
Doctests: no tests reported