Files
moonwell-client-core/docs
Sam Sung 4cc50bc5ab A two-texture M2 batch draws its second stage on UV set 1 (#2908)
A two-texture M2 batch drew its second stage only when it was sphere-mapped, and a lookup past its table was taken as generated or untransformed.

- **#1831.** The stage's coordinate and transform lookups are unchecked (`0x70b8bd`, `0x70b8aa`). Past its table each reads the file's next u16, and benilla now does the same. A transform index at or above the count gives identity (`0x70b90b`).
- **#1832.** Every lit `Model2.bls` program passes `texcoord[k]` to stage k, and vertex format 12 carries set 1 at `+0x28` (`0x71de2d`). So stage 1 reads UV set 1, through its own transform, rotation and scale included (`0x70b91f`). This applies in every M2 lane and the skybox.

No stock model changes, since set 1 is zero in every stock vertex. Custom and HD models draw their masks.

Tests cover the past-table reads, the set-1 parse and the slot rules.

Found in Adrinalin4ik/manila.

Fixes #1831
Fixes #1832

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Thorsten42 <3400178+Thorsten42@users.noreply.github.com>
2026-10-31 21:15:25 +07:00
..