Shaders: four fixes from other forks (mesh index edge flags, cube level log2, two-sampler branch, wave64 mask copies): 42 more shaders translate #1112
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!1112
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1112"
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?
@KyleS98 on GitHub · 2026-11-25 19:56 UTC · original
KyleS98:shaders/fork-fixes→main· +133 −11 · 2 files · 4 commits · openFour small translator fixes from other forks, brought onto main. Each is its own commit with the original author. All four are vendor-neutral.
exp primcorner is a 9-bit vertex index plus an edge flag above it (bits 9, 19, 29). We read 10 bits, so a corner with its edge flag set named a vertex ≥ 512. That's past the written ones, so the triangle was culled._clLog(op 23) is already base 2, and we multiplied by log2(e) again, so the level was 1.44× too coarse. The console's minimum level was also dropped:sampleLevelhas no clamp, so it's now applied to the level.I left out the integer-target blend part of ddb7332 (that's #715) and the tests of c0228d9.
Tested on an RTX 3090 Ti,
--console series-s. The tree wasd510ee4plus this branch, plus #798 and #1081 so the S profile renders the world. Warm cache, from boot into the prologue cell:cargo test -p victory-shader: 217 passed.Correction (same day): I first wrote here that Lucia's hair went from pale orange-blond to dark brown with this PR. That was wrong. Over 17 runs the hair colour follows something else:
So some pass that normally runs is skipped in those first runs and changes the hair. I'm looking for which one; it has nothing to do with this PR. The count of shaders that translate (286 → 244 that do not) is from the warm-up itself and stands.
AI-assisted (Claude Code; opened with Claude Opus 5.5, corrected with Claude Fable 5.2); runs and grabs on my machine; no game data.
From DexNom/VIctory 76749ce ("Recover voxel visibility shader when a wave64 mask is restored from scalar copies"). Co-Authored-By: Claude Opus 5.5 <[email protected]>@Ym1r1710 on GitHub · 2026-11-25 20:32 UTC · original
Tried this on an RTX 5080 (Series X profile, not S), on top of current main plus a few open PRs. Warm cache after the first run retranslated. In the cell scene at world+400 and +800 the picture looks the same as before as far as I can see: hair, faces and walls unchanged, nothing new broken. Frame time 104 ms vs 97 ms on the run before without it, but that's inside the 10 ms or so my runs wander by, so I wouldn't read anything into it. So no visible win on S-less X profile here, no regression either. Keeping it.
@HLVM04 on GitHub · 2026-11-25 20:34 UTC · original
A Series S data point from an RTX 5070 Ti (Ryzen 7 9800X3D, Windows 11 build 26200) where the hair did not change.
I cherry-picked the four commits onto our own Series S stack (an older fork main plus several open PRs, #798 among them, and some local changes). The median frame in the first gameplay scene was 74 ms, about where our runs without them sit, and I saw no visible regression.
The main character's hair still renders pale blond on this card with the four commits in. Since this is the same profile as your 3090 Ti test, the hair fix may depend on something else in your tree, or on timing. On our stack her skin and hair colour already varied between runs before this PR (lit or black, dark or blond), so this is weak evidence either way. I didn't count untranslated shaders before and after.
@grosterr on GitHub · 2026-11-25 22:40 UTC · original
A data point from an RTX 3060 12 GB, and one test that fails when this meets #770.
Machine: RTX 3060 12 GB, Ryzen 7 5700X, 32 GB, Windows 11, Series X profile.
Tree: the #770 stack (
d034ac1) + main9c184b3+ #1057, this PR (4bc83a6), #1044, #1101 and #1014. Branch:grosterr/victory-forkrtx3060.One test fails after the merge.
ir::tests::a_mask_parked_in_lanes_another_scalar_shares_comes_back_whole_with_shared_slots(from #854, carried in #770) passes on the stack and on the stack + main + #1057, and fails once this PR is in:Both #854 and the last commit here fix
PS_VoxelizeVisiblity, in two ways. #854 brings the parked mask back as a pair throughwith_shared_slots. With this PR,Lanes::move_sourcefollows the twos_mov_b32copies back to that pair, so even without shared slots EXEC comes out as the compare's lanes. The test had recorded the old limit ("built as it is, the mask comes back as two scalars, which the structurisation cannot see into"). The new answer is the right one, so only the expectation has to change:It is in
6a53386, together with the doc comment above the test. After it,victory-shaderhas 245 passed and 0 failed. Whoever merges this and #770 second will meet it.In the game (10 minutes, prologue cell block and corridor, 11 switches): 179 ms a frame at 5,564 draws, against 174 ms at 4,944 draws on the same tree with main
d510ee4and without these four PRs. That is the same within noise. Hair, faces, sunlight through the window and the corridor looked as before. Lucia's hair was dark both before and after, so on this tree the hair change cannot be seen either way. No errors in the log.Warm-up count:
translate --warm allwithVICTORY_HOST_WAVE=32: 232 of 25,985 do not translate, the same number as before this PR. On top of #854's paired wave64 form, the 42 shaders this PR adds over main seem to translate already. I did not compare which 232 they are.@KyleS98 on GitHub · 2026-11-26 01:25 UTC · original
Thanks for the three reports.
Lanes::move_sourcefollows the two scalar copies back to the pair, soa_mask_parked_in_lanes_another_scalar_shares_comes_back_whole_with_shared_slotsshould expect a non-opaque mask, as in your6a53386. Whichever of this and #770 merges second should take that one-line change. I'm happy to add it here if the maintainer prefers this PR to carry it. Also useful: on top of #854 the count doesn't move (232 both ways), so the 42 shaders are the ones #854's paired form already recovers.AI-assisted (Claude Code, Claude Fable 5.2).
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.