[pr-fix][rendering] The CPU occlusion image gets a far-plane stand-in where its view is not made (DARNER_OCCLUSION_FAR, on) #335
Loading…
Reference in a new issue
No description provided.
Delete branch "co11ector/occlusion-far"
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?
Contributor role (optional)
What it changes
The problem on main: read from the code only.
neutral_forgives every 2D texture slot whose host copy is not made the gray stand-in, 0x80 in every channel, which a shader reads as 0.5. For one texture of the title that value is wrong: the CPU occlusion image (128x72 R32_FLOAT), whichCS_InitDepthPyramidWithCpuOcclusion3x3reads as the pyramid's seed and the batch cull passes then read. Its depths are linear, about 1 to 2,300 (those measured on the same title in ReVIctory's notes), so 0.5 is nearer than anything in the image: the cull drops every batch for that frame (trees, props and buildings gone for a blink; #263, and jaxe reproduces it).This gives that image's slots a 128x72 R32_FLOAT texture of 1e6 instead (the image's own size, so that a read by texel index finds the far depth as a sampled read does), and
DARNER_OCCLUSION_FAR=0keeps the gray stand-in. The image is recognized by shape (2D, R32_FLOAT, 128x72): from the view's own words when it is a placed texture (its host copy not made is the case that matters) or from the resource when it has one. From ReVIctory'sVICTORY_OCCLUSION_FAR, in turn from VIda 471c423.How it was tested
Tested revision:
4f54eb1, based onmain'sf3840d7.Commands and results:
cargo clippy --workspace --all-targets --locked -- -D warnings— clean.cargo clippy --workspace --all-targets --all-features --locked -- -D warnings— clean.cargo test -p darner-gpu --locked descriptor::host— 106 passed, 0 failed, 1 ignored.cargo test -p darner-gpu --locked— the parallel lib suite exited with 0xc0000005 on this machine (STATUS_ACCESS_VIOLATION; the GPU-using tests run in parallel here). The descriptor::host tests above are the ones this change touches.Changes a default: yes, for every card: a slot of the occlusion image shows 1e6 instead of 0.5.
A/B result: none yet, and I do not claim this fixes the flicker reported in #263. In a 20-minute session on this machine the image's slot was neutralized once, at start, and the in-game flicker still reproduced. What is verified is that the shape matches and the stand-in is taken:
Gates run on that revision: gate 1 and gate 2; gate 3 as noted above (descriptor::host only).
Gameplay, when relevant: RX 9070 XT 16 GB, Adrenalin 32.0.32029.2010, i5-13600KF, 32 GB RAM, Windows 11; Series S profile, 720 render → 1440 output, FSR 4 Quality, FSR 4 frame generation 2x, textures High, ray tracing off, 30 fps cap.
Shader wave sizes tested: not relevant.
Hardware dependence: likely general (the image is the title's, not the card's); tested on one AMD card only.
Coverage gaps: no A/B of the visible flicker; the neutralized slot was seen once at start here, so a scene where it happens repeatedly is untested.
Checklist
main.docs/asset-policy.md.Checked for overlap
resource.rs).Give the CPU occlusion image a far-plane stand-in where its view is not made (DARNER_OCCLUSION_FAR, on)to [pr-fix][rendering][AMD] The CPU occlusion image gets a far-plane stand-in where its view is not made (DARNER_OCCLUSION_FAR, on)[pr-fix][rendering][AMD] The CPU occlusion image gets a far-plane stand-in where its view is not made (DARNER_OCCLUSION_FAR, on)to [pr-fix][rendering] The CPU occlusion image gets a far-plane stand-in where its view is not made (DARNER_OCCLUSION_FAR, on)View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.