Lavender/flower plants draw white with a cyan tint instead of purple (NVIDIA) #674

Closed
opened 2026-11-08 16:37:08 +00:00 by xophsy · 2 comments
xophsy commented 2026-11-08 16:37:08 +00:00 (Migrated from github.com)

Builder version

v2.0.0 (source 5a5c7e6, with PR #477 merged locally). Also seen on the first-day build (cdb4f1a, no local changes).

How you built

From source: python -I nx2/make_game.py --nup ... with the v2.0.0 HookshotBuilder tools (llvm-mingw, RX_CPM, WGPU_NATIVE set).

Game files given to it

A .nup (build e0f3ccfa)

The error

Lavender / flower plants draw white with a cyan tint instead of purple. The leaves keep their shape but have no colour, as if the texture is not bound. Screenshots (broken / expected) will be added to this issue.

From hookshot_log.txt (v2.0.0 run):

  • 0 skipped draws, no draws left out once the cache is warm.
  • prepared 31985 shader programs (39835 new, 7 failed, ...): 7 stage-5 programs do not lower, unsupported native opcode (native op 0x3a9, ...) (an ATOMG.CAS-like form). The plants were already white on the first-day build with 0 failed, so these are probably unrelated.

Settings: Ultra preset, frame generation off, resolution 100%, Lanczos, sharpness 40, RX_VK_SYNC_PIPELINES=1.

Operating system and free space on the output drive

Windows 11 (26300), RTX 4080 SUPER 16 GB, 2560x1440 at 359 Hz. About 700 GB free.

Confirmations

  • On the newest release, and it still happens there.
  • Open issues searched before filing (related: #35, #203, #11).
  • No game files or anything built from them is attached.
### Builder version v2.0.0 (source `5a5c7e6`, with PR #477 merged locally). Also seen on the first-day build (`cdb4f1a`, no local changes). ### How you built From source: `python -I nx2/make_game.py --nup ...` with the v2.0.0 HookshotBuilder tools (llvm-mingw, `RX_CPM`, `WGPU_NATIVE` set). ### Game files given to it A .nup (build `e0f3ccfa`) ### The error Lavender / flower plants draw white with a cyan tint instead of purple. The leaves keep their shape but have no colour, as if the texture is not bound. Screenshots (broken / expected) will be added to this issue. From `hookshot_log.txt` (v2.0.0 run): - `0 skipped` draws, no draws left out once the cache is warm. - `prepared 31985 shader programs (39835 new, 7 failed, ...)`: 7 stage-5 programs do not lower, `unsupported native opcode (native op 0x3a9, ...)` (an ATOMG.CAS-like form). The plants were already white on the first-day build with `0 failed`, so these are probably unrelated. Settings: Ultra preset, frame generation off, resolution 100%, Lanczos, sharpness 40, `RX_VK_SYNC_PIPELINES=1`. ### Operating system and free space on the output drive Windows 11 (26300), RTX 4080 SUPER 16 GB, 2560x1440 at 359 Hz. About 700 GB free. ### Confirmations - On the newest release, and it still happens there. - Open issues searched before filing (related: #35, #203, #11). - No game files or anything built from them is attached.
Mitchdl93 commented 2026-11-09 00:53:42 +00:00 (Migrated from github.com)

Hi! I investigated this issue on Hookshot 2.0.5 and found a register-mapping collision in the Ampere-to-Maxwell shader lowering.

In LowerToMaxwellWith, marker registers are allocated while scanning native operands sequentially. A marker chosen for an earlier destination can overlap a native source register encountered later, causing distinct values to share a register mapping.

The attached patch reserves all native operand register ranges before allocating markers. It fixes the white/cyan flowers on my NVIDIA RTX 5070 Ti Laptop GPU without changing textures or overriding their colors.

Validation:

  • Two synthetic FADD regression cases fail with the original code and pass with the correction.
  • The existing DEPBAR lowering test still passes.
  • Flowers render purple at multiple distances and camera angles, including after regenerating and reloading the shader cache.

An enemy with a similar visual issue also appears fixed during further play, although that observation needs separate confirmation.

The attachment includes the source patch, synthetic regression test, documentation, and a before/after screenshot. It contains no game binaries/assets, shader caches, save files, logs, or local installation metadata.

Could you review the approach? This is a local fix and broader testing would be helpful.

Hookshot-register-fix.zip

Hi! I investigated this issue on Hookshot 2.0.5 and found a register-mapping collision in the Ampere-to-Maxwell shader lowering. In `LowerToMaxwellWith`, marker registers are allocated while scanning native operands sequentially. A marker chosen for an earlier destination can overlap a native source register encountered later, causing distinct values to share a register mapping. The attached patch reserves all native operand register ranges before allocating markers. It fixes the white/cyan flowers on my NVIDIA RTX 5070 Ti Laptop GPU without changing textures or overriding their colors. Validation: - Two synthetic FADD regression cases fail with the original code and pass with the correction. - The existing DEPBAR lowering test still passes. - Flowers render purple at multiple distances and camera angles, including after regenerating and reloading the shader cache. An enemy with a similar visual issue also appears fixed during further play, although that observation needs separate confirmation. The attachment includes the source patch, synthetic regression test, documentation, and a before/after screenshot. It contains no game binaries/assets, shader caches, save files, logs, or local installation metadata. Could you review the approach? This is a local fix and broader testing would be helpful. [Hookshot-register-fix.zip](https://github.com/user-attachments/files/34558794/Hookshot-register-fix.zip)
NotRexed commented 2026-11-09 09:18:17 +00:00 (Migrated from github.com)

Fixed in v2.0.6 (and in v2.0.7) by PR #922: a register renaming collision in the Ampere-to-Maxwell lowering left the flowers' colour undefined (the same cause @Mitchdl93 found, thanks for the analysis). Translated shaders are rebuilt on the next start after the update. If the flowers are still white on v2.0.7, comment with a screenshot and log and we'll reopen.

Fixed in v2.0.6 (and in v2.0.7) by PR #922: a register renaming collision in the Ampere-to-Maxwell lowering left the flowers' colour undefined (the same cause @Mitchdl93 found, thanks for the analysis). Translated shaders are rebuilt on the next start after the update. If the flowers are still white on v2.0.7, comment with a screenshot and log and we'll reopen.
Commenting is not possible because the repository is archived.
No milestone
No assignees
1 participant
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
MagicBeanDev/Hookshot#674
No description provided.