Liveries: stickers on vehicle glass (zones from _COLOR0) #496

Manually merged
github merged 2 commits from github-bot/gh-496 into gh-pr/496/base 2026-11-28 12:44:32 +00:00 AGit
Owner

@⁠holdmysocks on GitHub · 2026-11-27 19:07 UTC · original
holdmysocks:glass-zones → master · +68 −15 · 3 files · 2 commits · merged 2026-11-28 12:34 UTC

Stickers on vehicle windows were drawn nowhere. The Buffalo gang brands (zones 93-99) and about 100 other brands put stickers on glass, mostly rear-window stickers on zones 97/98 (Burrito, Montagne, Shuttle and the gang brands).

Why

  • The vehicle glass shaders (standard_vehicle_glass, _crack, _windshield) read the same zone table as the body shaders: the same root-table slot, keyed by byte 1 of a flat vertex attribute, followed by a load of the layer record. So the game draws livery layers on glass.
  • On glass meshes that byte comes from the first colour stream (_COLOR0 byte 0). The fourth byte of the second stream (_COLOR1), which the viewer read, holds only 0-3 on glass.
  • Buffalo glass zones: 93/94 are the windscreen halves, 97/98 the rear screen halves and 101-108 the side windows (bones windscreen, windscreen_r, window_*). This holds on all 12 Buffalo configurations.

Changes

  • vehlivery::zone_in_colour0(shader): true for the vehicle glass shaders.
  • Viewer: on glass materials, a vertex's zone is taken from _COLOR0 byte 0 when the model loads. Drawing, the Liveries panel's zone list and click picking all use it.
  • Livery export (decal_prim): on glass primitives, the zone is read from the first colour stream.

Tests

  • cargo test -p sixng-core vehlivery: 4 pass, one of them new (a glass primitive takes its zones from the first stream).
  • cargo test -p sixng-gui: 57 pass.
  • Rendered the Buffalo with BUFFALO_GANG_CASHCITY (variant 1). The rear window is bare with master and carries the Cash City sticker with this change.

Not changed

  • Zones 95, 96 and 99 aren't on any Buffalo glass. They may be on other models that share these layouts.
**@⁠holdmysocks** on GitHub · 2026-11-27 19:07 UTC · [original](https://github.com/holdmysocks/SixNG/pull/496) `holdmysocks:glass-zones` → `master` · +68 −15 · 3 files · 2 commits · merged 2026-11-28 12:34 UTC Stickers on vehicle windows were drawn nowhere. The Buffalo gang brands (zones 93-99) and about 100 other brands put stickers on glass, mostly rear-window stickers on zones 97/98 (Burrito, Montagne, Shuttle and the gang brands). ## Why - The vehicle glass shaders (`standard_vehicle_glass`, `_crack`, `_windshield`) read the same zone table as the body shaders: the same root-table slot, keyed by byte 1 of a flat vertex attribute, followed by a load of the layer record. So the game draws livery layers on glass. - On glass meshes that byte comes from the first colour stream (`_COLOR0` byte 0). The fourth byte of the second stream (`_COLOR1`), which the viewer read, holds only 0-3 on glass. - Buffalo glass zones: 93/94 are the windscreen halves, 97/98 the rear screen halves and 101-108 the side windows (bones `windscreen`, `windscreen_r`, `window_*`). This holds on all 12 Buffalo configurations. ## Changes - `vehlivery::zone_in_colour0(shader)`: true for the vehicle glass shaders. - Viewer: on glass materials, a vertex's zone is taken from `_COLOR0` byte 0 when the model loads. Drawing, the Liveries panel's zone list and click picking all use it. - Livery export (`decal_prim`): on glass primitives, the zone is read from the first colour stream. ## Tests - `cargo test -p sixng-core vehlivery`: 4 pass, one of them new (a glass primitive takes its zones from the first stream). - `cargo test -p sixng-gui`: 57 pass. - Rendered the Buffalo with BUFFALO_GANG_CASHCITY (variant 1). The rear window is bare with master and carries the Cash City sticker with this change. ## Not changed - Zones 95, 96 and 99 aren't on any Buffalo glass. They may be on other models that share these layouts.
The vehicle glass shaders (standard_vehicle_glass, _crack, _windshield)
read the same zone table as the body shaders, but their meshes fill the
zone byte from the first colour stream, not the fourth byte of the
second (which holds 0-3 on glass). So stickers on windscreens and
windows (zones 93-108 on the Buffalo) were drawn nowhere.

The viewer and the livery export now take a glass mesh's zone from
_COLOR0 byte 0 (vehlivery::zone_in_colour0).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 19:09:40 +00:00
github-bot changed target branch from master to gh-pr/496/base 2026-11-28 12:44:29 +00:00
github manually merged commit eb26f14208 into gh-pr/496/base 2026-11-28 12:44:32 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.