[pr-fix][rendering][shaders] Shadows: the remaining translated CS_ShadowRenderTiled programs as lane pairs on 32-lane hosts (bright blocks around the head) #701

Open
untried844 wants to merge 1 commit from untried844/Darner:tiled-shadows-pairs into post-merge
First-time contributor

What it changes

  • The problem on post-merge: a ring of bright blocks around a character's head (and at other near/far edges) where the sun shadow is missing, on a 32-lane host. No issue open for it; seen under a building in shadow, camera looking down at the character.

A frame capture (--features diagnostics, F7) shows the blocks in the 1712x960 sun shadow mask that the CS_ShadowRenderTiled* family writes: lit fragments in the tiles that hold both the head and the ground behind it, before any lighting reads it.

Six programs of the family already take Rule::LanePairs in by_hash/whole.rs, for their wave-wide votes. This gives the same rule to the other eleven translated ones (Misc, MiscCB, CascadesAlpha, MiscAlpha, the four MiscHair*, MiscPPPC, MiscCBPPPC, CascadesAlphaPPPC). CS_ShadowRenderTiledCascades 191ecaed66eea3b1 runs as a replacement and is not touched.

Not narrowed further: the four hair programs alone as lane pairs did not remove the ring; adding the other seven did. Which of the seven is enough was not tested.

How it was tested

  • Tested revision: this commit on post-merge 28a9b42, in a build that also held my other local changes.

  • Commands and results: cargo build --release --locked -p darner on this branch alone: builds. darner translate with DARNER_HOST_MAX_WAVE=32 and a temporary probe: all seventeen programs are accepted in the paired form with 32-lane waves.

  • Changes a default: yes, for 32-lane hosts (NVIDIA). These eleven programs are translated again once.

  • A/B result, same save and spot, same settings:

    A (six programs paired) B (all seventeen)
    Bright ring of blocks around the head present gone
  • Checks run on that revision: cargo build. cargo test -p darner-shader has no tests on this line. cargo clippy not run.

  • Gameplay: Intel Core i9-13900K · 32 GB DDR5-6400 (2 sticks) · NVIDIA GeForce RTX 4090 24 GB, driver 621.40 · Windows 11 Pro build 26300. Series X profile, 2560x1440 output, DLSS Quality (1712x960 render) and DLAA, HDR on, frame generation 2x, hardware ray tracing.

  • Hardware dependence: may depend on the host's wave size; untested on other cards.

  • Coverage gaps: one card, one place. Frame time not measured (the paired form costs something; #504 on Main measured the same family folded within noise on an RTX 4080).

Checklist

  • I ran this change in the game, or say below why it can't be (docs, tests only).
  • This PR contains one change based on post-merge (28a9b42).
  • The diff contains no game files, code or assets.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: #504 (same family and symptom on Main, by folding; that switch does not exist on post-merge), #43 (the paired form on Main)
  • Replaces or overlaps: none on post-merge

The change was written with a coding agent (AI-assisted) and run by me in the game.

## What it changes - The problem on `post-merge`: a ring of bright blocks around a character's head (and at other near/far edges) where the sun shadow is missing, on a 32-lane host. No issue open for it; seen under a building in shadow, camera looking down at the character. A frame capture (`--features diagnostics`, F7) shows the blocks in the 1712x960 sun shadow mask that the `CS_ShadowRenderTiled*` family writes: lit fragments in the tiles that hold both the head and the ground behind it, before any lighting reads it. Six programs of the family already take `Rule::LanePairs` in `by_hash/whole.rs`, for their wave-wide votes. This gives the same rule to the other eleven translated ones (`Misc`, `MiscCB`, `CascadesAlpha`, `MiscAlpha`, the four `MiscHair*`, `MiscPPPC`, `MiscCBPPPC`, `CascadesAlphaPPPC`). `CS_ShadowRenderTiledCascades` `191ecaed66eea3b1` runs as a replacement and is not touched. Not narrowed further: the four hair programs alone as lane pairs did not remove the ring; adding the other seven did. Which of the seven is enough was not tested. ## How it was tested - Tested revision: this commit on `post-merge` `28a9b42`, in a build that also held my other local changes. - Commands and results: `cargo build --release --locked -p darner` on this branch alone: builds. `darner translate` with `DARNER_HOST_MAX_WAVE=32` and a temporary probe: all seventeen programs are accepted in the paired form with 32-lane waves. - Changes a default: yes, for 32-lane hosts (NVIDIA). These eleven programs are translated again once. - A/B result, same save and spot, same settings: | | A (six programs paired) | B (all seventeen) | |---|---|---| | Bright ring of blocks around the head | present | gone | - Checks run on that revision: `cargo build`. `cargo test -p darner-shader` has no tests on this line. `cargo clippy` not run. - Gameplay: Intel Core i9-13900K · 32 GB DDR5-6400 (2 sticks) · NVIDIA GeForce RTX 4090 24 GB, driver 621.40 · Windows 11 Pro build 26300. Series X profile, 2560x1440 output, DLSS Quality (1712x960 render) and DLAA, HDR on, frame generation 2x, hardware ray tracing. - Hardware dependence: may depend on the host's wave size; untested on other cards. - Coverage gaps: one card, one place. Frame time not measured (the paired form costs something; #504 on `Main` measured the same family folded within noise on an RTX 4080). ## Checklist - [x] I ran this change in the game, or say below why it can't be (docs, tests only). - [x] This PR contains one change based on `post-merge` (`28a9b42`). - [x] The diff contains no game files, code or assets. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: #504 (same family and symptom on `Main`, by folding; that switch does not exist on `post-merge`), #43 (the paired form on `Main`) - Replaces or overlaps: none on `post-merge` The change was written with a coding agent (AI-assisted) and run by me in the game.
Six of the family already take Rule::LanePairs. The other eleven translated ones are given the same rule: with each host wave on its own, pixels of the sun shadow mask stayed lit in tiles holding both a near and a far surface (a bright ring of blocks around a character's head).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'tiled-shadows-pairs:untried844-tiled-shadows-pairs'
git switch 'untried844-tiled-shadows-pairs'

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.

git switch 'post-merge'
git merge --no-ff 'untried844-tiled-shadows-pairs'
git switch 'untried844-tiled-shadows-pairs'
git rebase 'post-merge'
git switch 'post-merge'
git merge --ff-only 'untried844-tiled-shadows-pairs'
git switch 'untried844-tiled-shadows-pairs'
git rebase 'post-merge'
git switch 'post-merge'
git merge --no-ff 'untried844-tiled-shadows-pairs'
git switch 'post-merge'
git merge --squash 'untried844-tiled-shadows-pairs'
git switch 'post-merge'
git merge --ff-only 'untried844-tiled-shadows-pairs'
git switch 'post-merge'
git merge 'untried844-tiled-shadows-pairs'
git push origin 'post-merge'
Sign in to join this conversation.
No reviewers
No milestone
No project
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.

Dependencies

No dependencies set

Reference
TrustNo1/Darner!701
No description provided.