Skip to content

[5/8] Correct thin textured polygon sampling in MGS1 - #117

Merged
nuggslet merged 1 commit into
nuggslet:masterfrom
TideGear:pr/05-thin-polygons
Sep 17, 2026
Merged

nuggslet merged 1 commit into
nuggslet:masterfrom
TideGear:pr/05-thin-polygons

Conversation

@TideGear

@TideGear TideGear commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Correct thin textured polygon sampling in the implemented MGS1 x64 renderer path. Expose the correction through ThinTexturedQuads. The x86 build is checked for compatibility; this does not claim an x86 rendering implementation.

Review order

PR 5 of 8 in the complete TideGear contribution. These are an ordered stack against upstream master; GitHub shows earlier unmerged changes cumulatively. Merge in order 1 through 8 and update the remaining branches after each merge.

Previous PR: #116

Review only this step

Validation

  • This branch passed Release x64 and x86 builds with the development installer disabled.
  • Standalone native RAM repair tests passed for both architectures.
  • Standalone scoped patch-range tests passed for both architectures.

Ready for maintainer review. The documented gameplay testing remains outstanding; no gameplay pass is claimed.

Complete series

  1. [1/8] Build Zydis with the selected toolset and invalidate stale caches #113
  2. [2/8] Validate PPF3 files and preserve executable RAM patches #114
  3. [3/8] Preserve MGS1 configuration and Integral language choices #115
  4. [4/8] Correct USA brightness help with scoped disc patches #116
  5. [5/8] Correct thin textured polygon sampling in MGS1 #117
  6. [6/8] Add Integral English and grenade patches with the complete toolchain #118
  7. [7/8] Add optional MGS1 and VR testing aids #119
  8. [8/8] Add patch watches, RAM auditing and debugger tools #120

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bb9302ed99

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/games/mgs1.h
// Scope the collection replacement to USA and the selected disc.
for (unsigned disk = 0; disk < MGS1_RangeBlacklist_BrightnessText.size(); ++disk) {
const auto &range = MGS1_RangeBlacklist_BrightnessText[disk];
SQHook<Squirk::Standard>::SetPatchRangeBlacklist(981, disk, range.first, range.second);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Bypass the blacklist for the built-in brightness patch

With the default BrightnessText=fixed, these ranges also contain both offsets produced by MGS1_BrightnessTextPatches(). ProcessBuiltins() submits those writes through SQEmuTask::EntryCdRomPatch, so SQNative_entryCdRomPatch() matches this same RangeBlacklist and suppresses them; the offsets are far outside the executable RAM-mirroring range, so they are not applied by that path either. Consequently fixed merely blocks the collection replacement and displays the original six-line texture instead of installing the intended blanked four-line data. The built-in write needs to bypass or be distinguishable from the collection-patch blacklist.

Useful? React with 👍 / 👎.

@ShizCalev

ShizCalev commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Going by the name alone, but does this correct the subpixel rendering inaccuracy at distance?

(test case for this is vr -> puzzle mode 4 iirc.)

left is retrotink, right is MC

image

@nuggslet
nuggslet changed the base branch from master to pr/04-usa-brightness September 14, 2026 03:44

@nuggslet nuggslet left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nuggslet
nuggslet changed the base branch from pr/04-usa-brightness to master September 16, 2026 17:17
@nuggslet
nuggslet merged commit 28cd98c into nuggslet:master Sep 17, 2026
4 checks passed
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.

3 participants