Skip to content

fix(d3d): sample the title sea shimmer with its point mip - #155

Merged
NoRain211 merged 1 commit into
mainfrom
codex/title-sea-point-mip
Oct 24, 2026
Merged

NoRain211 merged 1 commit into
mainfrom
codex/title-sea-point-mip

Conversation

@NoRain211

Copy link
Copy Markdown
Owner

Summary

The title sea's shimmer samples its stage-1 texture with linear min/mag, a point mip filter and a -2 LOD bias (read live in xemu). The stage-1 combiner from #96 accepted only an all-linear sampler, so every sea shimmer draw was rejected and fell back to the plain path: no shimmer on any build of main since #96.

 attach_combiner(stage 1)
-  require min == linear, mag == linear, mip == linear
+  require min == linear, mag == linear, mip in {point, linear}
+  draw.combiner_mip_point = (mip == point)
 submitDraw
   sampler = stage-1 sampler + MipLODBias(-2)
+  if combiner_mip_point: Filter = MIN_MAG_LINEAR_MIP_POINT

Other stage-1 filter values (0, 3) are still rejected, and the adapter test lists them as such. This is 72e99c7 from codex/title-sea-mip-point, rebased onto current main with no conflicts.

Verification

  • MSVC Debug ctest: 47 of 47 pass. llvm-mingw clang ctest: 45 of 45 pass. python -m unittest discover -s tools: 66 pass (1 skipped). public_export.py verify --require-public-tree passes.
  • The adapter test now requires a point-mip stage 1 to be admitted with combiner_mip_point set, and rejects filter values 0 and 3. The D3D11 test requires the biased sampler to use MIN_MAG_LINEAR_MIP_POINT.
  • Observed in the game (agent run, startup and title only): a diagnostic runner logged every stage-1 combiner state and its outcome, with this change switched on and off. The shimmer state (stage-1 op 23, mip filter point, bias -2.0) was rejected in all 3,598 draws without the change and accepted in all 3,668 with it. Three other stage-1 states stay rejected either way. The diagnostic was temporary and is not in this PR.
  • Not compared visually by the agent. The shimmer needs a play test.

Contribution checklist

  • The change follows AGENTS.md and CONTRIBUTING.md.
  • No XBE, generated game C, retail instruction bytes, extracted assets or filenames, saves, BIOS data, private paths, or run evidence are included.
  • Third-party material and its license are identified, if applicable (none).

The title sea's stage-1 MULTIPLYADD shimmer samples linear min/mag with a point mip filter and a -2 LOD bias (confirmed live in xemu). The combiner accepted only an all-linear sampler, so every sea draw fell back to the plain path. Accept a point mip on stage 1 and build its sampler with MIN_MAG_LINEAR_MIP_POINT.
@norain211-mira

norain211-mira Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Mira PR Walkthrough

Fixes the missing title-sea shimmer. The stage-1 combiner only accepted samplers with linear min, mag and mip filtering, but the shimmer uses linear min/mag with a point mip filter and a -2 LOD bias, so every shimmer draw fell back to the plain path. The adapter now also accepts a point mip filter and marks the draw with a new combiner_mip_point flag. When the flag is set, the D3D11 presenter builds the biased sampler with MIN_MAG_LINEAR_MIP_POINT. Tests cover the newly accepted case and check that filter values 0 and 3 are still rejected.

sequenceDiagram
participant Game
participant Adapter as d3d_draw_adapter
participant Presenter as D3D11 presenter
Game->>Adapter: stage-1 sampler (min/mag linear, mip point, bias -2)
Adapter->>Adapter: accept mip in {point, linear}
Adapter->>Presenter: draw with combiner_mip_point = true
Presenter->>Presenter: sampler Filter = MIN_MAG_LINEAR_MIP_POINT, MipLODBias -2
Presenter-->>Game: shimmer rendered
Loading
Confidence: 4/5   ◉◉◉◉○   Safe to merge
  • A small, narrow change with tests and in-game logs showing the shimmer draws are now accepted; the only open item is a visual play test.

5 files reviewed


Comment @norain211-mira help to get the list of available commands and usage tips.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-24T14:17:24.847968Z
We couldn’t complete this review. Comment @codex review to try again.
7df74e1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@NoRain211
NoRain211 merged commit cb658bc into main Oct 24, 2026
9 checks passed
@NoRain211
NoRain211 deleted the codex/title-sea-point-mip branch October 24, 2026 14:33
@NoRain211 NoRain211 mentioned this pull request Oct 28, 2026
3 tasks done
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