# L4RA road marking provenance at the current drive camera

## Checked source location

The r122 drive capture at route 450, distance 300 places the player at world
XY approximately `(-675.88, -548.46)`. The stream mesh covering that view is
`TRN_CS_ROADA_CHOP_M1_R3`. I read its `0x134B02` material-slice table,
`0x134B01` vertices, `0x134B03` indices, `0x134012` texture slots, and the
matching embedded TPK records directly from the XP-extracted
`STREAML4RA.BUN`. The mesh has one identity placement in that stream region.

## Authored slices

| Slice | Source texture | Triangles | World XY bounds (m) | UV bounds |
| --- | --- | ---: | --- | --- |
| 0 | `ARC_SIDEWALK_E` | 52 | X −707.25…−660.98, Y −572.59…−515.26 | U 0…2, V 0.10…1 |
| 1 | `RDP_INTERSECT_AA_WH` | 10 | X −700.54…−687.68, Y −562.38…−540.42 | U 0.002…4.498, V 0…1 |
| 2 | `RDP_INTERSECTMIDTILE` | 17 | X −712.63…−693.00, Y −561.06…−514.16 | U 0.002…0.885, V −0.998…0.012 |
| 3 | `RDP_LANEA_YS_AA_KT` | 12 | X −692.81…−661.39, Y −564.57…−547.23 | U 1…2, V 0.25…1 |
| 4 | `RDP_LANEB_WD_AA_KT` | 12 | X −694.10…−661.19, Y −568.58…−543.44 | U 0…2, V 0.25…1 |
| 5 | `RDP_ROADSTRIP_MC` | 6 | X −691.53…−661.59, Y −560.56…−551.02 | U 0…1, V 0.25…1 |

The packaged clean GLB retains these six slice names, texture keys, and
`usage=2, blend=0` source flags. The viewer reports `syntheticMarkings: 0`; it
does not draw a separate lane line. The prior renderer treated P8 palette bytes
as RGBA. These records are Direct3D `D3DCOLOR` entries, which are BGRA in
little-endian storage. The material name `RDP_LANEA_YS_AA_KT` also identifies
the stripe as yellow. The offline decoder preserves raw palette bytes in the
PNG export; revision r136 swaps red and blue at draw time only for recovered
P8 materials, restoring the intended yellow while leaving DXT road maps
unchanged. The earlier OpenUG2 comparison repeated the same erroneous PNG
channel interpretation and was not an independent check of palette byte
order.

## Source vertex prelight, revision r127

The retail RDP material records on this road slice use opaque texture sampling,
and the exported GLB preserves the mesh's `COLOR_0` vertex colors. The OpenUG2
world renderer's default path enables vertex color and its shader multiplies
that color by two. The WebGL opaque road pass previously ignored `COLOR_0`,
which made this pavement much brighter than the retail-data reference. Revision
r127 now applies `texture.rgb * clamp(COLOR_0.rgb * 2, 0, 1.6)` for opaque road
textures. The latest Chrome capture shows the pavement darkened and the P8
lane stripe yellow, with white crossing and lane dashes. This aligns the
material-color operation; it does not establish the correct neighboring road
mesh/material placement.

There is no procedural lane-marking pass in the current viewer
(`syntheticMarkings: 0`). The hatch, crosswalk, lane paint, and dashes in the
capture are sampled from the original `RDP_*` material textures using their
exported UV coordinates. The visible placement defect is therefore still in
the authored mesh/material/UV assembly or in the streamed road context, not a
line added by the WebGL renderer.

## Warm vertex tint correction, revision r269

A later casino-street capture sampled `RDP_LANEA_YS_AA_KT` at the player and
found neutral gray texture RGB near `(92, 97, 98)` over warm source vertex color
near `(0.85, 0.60, 0.53)`. The r127 RGB multiply turned that pavement salmon.
With `cityLightGain=0`, the same warm cast remained, isolating the material
prelight from the authored local fixtures. The opaque RDP pass now uses the
vertex-color luminance for its MODULATE2X prelight level and preserves the
texture RGB. The default-light Chrome capture shows gray pavement with the
sampled yellow and white marks still present. This is a visual correction to
the missing-base export path; it does not prove the retail shader discarded
vertex chroma, and it has only been reviewed at this casino street.

## Evidence

- [r122 route 450 capture](images/218-r122-body-a-source-road-review.png)
- [r136 P8 palette correction capture](images/233-r136-p8-road-marking-channel-fix.png)
- [Same-location retail-data reference capture](images/219-retail-data-route450-p8-palette-reference.png)
- [Raw extracted `RDP_ROADSTRIP_MC` source texture](images/222-raw-rdp-roadstrip-mc-source.png)
- [RDP material image sheet](images/176-intersection-texture-material-layers.png)
- Source package: `reverse-engineering/city-l4ra-textured-clean.glb`
- Exporter: `tools/export_nfsu2_world.py`
