Resolve distance-dependent black shoreline rendering #4
Labels
No labels
accessibility
area: compatibility
area: docs
area: hygiene
area: infra
area: memory
area: ray-tracing
area: rendering
area: shaders
area: submission
area: textures
bug
ci
dependencies
difficulty: advanced systems
difficulty: intermediate
documentation
duplicate
enhancement
experimental
good first issue
help wanted
invalid
known issue
performance
priority: P0
priority: P1
priority: P2
proposal
question
rendering
research
testing
triage
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/VictoryX-dev--VictoryX#4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@VictoryX-dev on GitHub · 2026-12-03 02:57 UTC · original
Problem
Certain shoreline surfaces appear normal from a distance but turn black when the camera approaches closely.
Known Evidence
VICTORY_DEPTH_READ_SAMPLED=1(draw.rs,draw/depth_read_state_tests.rs): transitions read-only depth planes sampled by shaders toD3D12_RESOURCE_STATE_DEPTH_READ | D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE(or non-pixel equivalent) so AMD HTILE decompresses before shader sampling. On an RX 9070 XT synthetic fixture, enabling the switch restored the expected sampled depth (z = 0.875vs corrupted0.373without it), and all 22 depth state fixtures pass both off and on.VICTORY_CARD_LEVELS=3(diagnostics builds only,texture/levels.rs): secondary hypothesis investigating textures grown on the GPU (lower mips copied on-card while higher mips stream into title memory and appear via widened SRVs).Approaches That Did Not Work
VICTORY_CARD_LEVELS=2(kept off): Uploading all non-card-written subresources unconditionally risks copying foreign bytes from reused title memory on textures that were never widened by the title.Relevant Source Modules
runtime/crates/victory-gpu/src/draw.rsruntime/crates/victory-gpu/src/draw/depth_read_state_tests.rsruntime/crates/victory-gpu/src/texture/levels.rsruntime/crates/victory-gpu/src/texture/levels_tests.rsruntime/crates/victory-gpu/src/resource.rsruntime/crates/victory-gpu/src/descriptor.rsExpected Contribution
VICTORY_DEPTH_READ_SAMPLED=1in gameplay checkpoints (both visually on close-up shorelines and for frame-time/barrier overhead viaVICTORY_AB=20,VICTORY_DEPTH_READ_SAMPLED).VICTORY_DEPTH_READ_SAMPLED=1, inspect material bindings, depth/stencil plane separation and widened-SRV texture mip growth (VICTORY_CARD_LEVELS=3) and build a synthetic fixture reproducing the remaining failure path.Acceptance Criteria