Skip to content

Conversation

@Cerwym
Copy link
Contributor

@Cerwym Cerwym commented Feb 12, 2026

all texture coord cals… wrap in 32 row texture boundary.

The calculation to remap texture coords is exacerbated my looking at things with sharp angles, that are textured and while the player is in possession of a minion

Copilot AI review requested due to automatic review settings February 12, 2026 09:29
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a texture coordinate overflow issue in the trig_render_md05 triangle rendering function by constraining the high byte of texture coordinates to a 32-row boundary. The fix addresses rendering artifacts that occur when viewing textured objects at sharp angles while the player possesses a minion.

Changes:

  • Modified texture coordinate mask from 0xFF (8 bits, 0-255) to 0x1F (5 bits, 0-31) for the high byte (colH) in texture coordinate calculations
  • Applied the fix to both the negative and non-negative point_x code paths in trig_render_md05

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Cerwym Cerwym closed this Feb 12, 2026
@Cerwym Cerwym reopened this Feb 12, 2026
@Cerwym Cerwym assigned PieterVdc and Loobinex and unassigned Loobinex Feb 12, 2026
@Cerwym Cerwym marked this pull request as draft February 12, 2026 10:51
@Cerwym Cerwym marked this pull request as ready for review February 12, 2026 10:51
@Loobinex Loobinex merged commit 32a34af into dkfans:master Feb 12, 2026
1 check 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