Skip to content

Round-2 visual correctness: cutout transmission dedupe, 2D gamma, sharpen knob#76

Closed
proggeramlug wants to merge 1 commit into
fix/round2-stabilityfrom
fix/round2-visual-correctness
Closed

Round-2 visual correctness: cutout transmission dedupe, 2D gamma, sharpen knob#76
proggeramlug wants to merge 1 commit into
fix/round2-stabilityfrom
fix/round2-visual-correctness

Conversation

@proggeramlug

Copy link
Copy Markdown
Contributor

Stacked on #75 (round-2 stability). Three surgical correctness fixes from the audit, plus two tickets for the items that need real design work.

Duplicated cutout transmission (audit F3 side-finding)

fs_main_scene's foliage backlit-transmission block appears twice, verbatim — 1.7× the intended strength — and never multiplied by the sun shadow factor, so a canopy standing in another tree's shadow still glowed at full transmission. Dormant right now (the shooter draws no MASK assets on this path) but a landmine for any future cutout foliage. De-duplicated; survivor is shadowed.

2D gamma (audit F5)

2D vertex colors (shapes, textured quads, glyph text) went into the sRGB swapchain view as raw /255 values — double-encoded, washing HUD midtones bright and skewing glyph AA. Now sRGB-decoded to linear, deliberately scoped to the 2D pass: the 3D immediate batch and model tints keep their historical interpretation, since flipping those would silently re-tint every drawCube/drawModel in shipped games (verified by golden churn during development — the split leaves all 3D goldens byte-identical, only shapes_2d regenerates).

Composite sharpen knob (audit F8)

setSharpenStrength / bloom_set_sharpen_strength — the unsharp mask was hardcoded at 0.8 with no runtime control, and it visibly halos high-contrast silhouettes at 4K output. Default unchanged; games can now tune or disable (0 skips the 4 extra HDR taps + extra tonemap). Manifest entry included.

Tickets

  • EN-021 — SSR+IBL specular exclusive ownership: deferred rather than half-fixed, because scaling ibl_spec down without an env fallback on SSR miss (today: black) would dim off-screen-reflection pixels — a worse artifact than the double-count. Full sketch in the ticket.
  • EN-022 — motion vectors for material-system draws: the whole world writes velocity=0, so TAA's motion clamp never engages (primary TSR-shimmer mechanism, audit F8). Scoped as the ABI project it is.

Suite green: 99 lib + 7 golden.

…ma, sharpen knob

- fs_main_scene's foliage backlit-transmission block was pasted TWICE
  (verbatim, 1.7x intended strength) and ran unshadowed — a canopy in
  another tree's shadow still glowed at full strength. Dormant in the
  shooter today (no MASK assets drawn) but a landmine for any cutout
  foliage. De-duplicated + multiplied by the sun shadow factor.
  (audit F3 side-finding)

- 2D colors (shapes, textures, text) are now sRGB-decoded to linear
  before hitting the sRGB swapchain view — they were double-encoded:
  washed-bright HUD midtones, gamma-skewed glyph AA. Deliberately
  scoped to the 2D pass via a separate color_to_f32_srgb helper: the
  3D immediate batch and model tints keep their historical raw /255
  interpretation, because flipping those would silently re-tint every
  existing drawCube/drawModel call in shipped games. shapes_2d golden
  regenerated (midtones darken to their authored values); all 3D
  goldens unchanged. (audit F5)

- New FFI `setSharpenStrength` / bloom_set_sharpen_strength: the
  composite unsharp mask was hardcoded 0.8 with no runtime control
  while visibly haloing silhouettes at 4K output. Default unchanged.
  (audit F8; manifest entry included — Perry silently no-ops
  undeclared natives)

- docs/tickets.md: EN-021 (SSR+IBL exclusive ownership — deferred
  because a correct fix needs the env-miss fallback in the SSR pass,
  not just the ibl_spec complement) and EN-022 (motion vectors for
  material-system draws — the in-motion quality project).
@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 98618215-b777-4703-87ee-05c4f98f6cab

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/round2-visual-correctness

Comment @coderabbitai help to get the list of available commands.

@proggeramlug

Copy link
Copy Markdown
Contributor Author

Landed in main via the round-2 consolidation merge (#83). All commits from this branch are now on main; closing as merged-through-integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant