Metal renderer: the body paint swap on vehicle parts #73

Manually merged
github merged 1 commit from gh-pr/73/head into gh-pr/73/base 2026-11-26 20:07:44 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-23 19:19 UTC · original
holdmysocks:claude/metal-paint → master · +11 −1 · 1 files · 1 commits · merged 2026-11-23 20:36 UTC

The macOS (Metal) renderer showed vehicle part colours but not the Car paint colour on the body.

Change

  • Materials coloured per part id carry bit 10 in flags.w, as in the wgpu renderer.
  • The Metal fragment shader gives vertices whose tint alpha is 254 (the primary body paint) the Car paint colour.

Not run

This was written on Windows and has not been run. The file is only compiled on macOS, and the Metal shader source is compiled when the viewer starts on a Mac, so the macOS CI job (Rust build only) does not prove the shader compiles. Please have it looked at on a Mac before relying on it; a shader error there would stop the Metal viewer from starting.

Not done on Metal

  • Per-part roughness and metal: its lighting has no specular term to use them.
  • Lamps and brake glow.
**@⁠holdmysocks** on GitHub · 2026-11-23 19:19 UTC · [original](https://github.com/holdmysocks/SixNG/pull/73) `holdmysocks:claude/metal-paint` → `master` · +11 −1 · 1 files · 1 commits · merged 2026-11-23 20:36 UTC The macOS (Metal) renderer showed vehicle part colours but not the Car paint colour on the body. ## Change - Materials coloured per part id carry bit 10 in `flags.w`, as in the wgpu renderer. - The Metal fragment shader gives vertices whose tint alpha is 254 (the primary body paint) the Car paint colour. ## Not run **This was written on Windows and has not been run.** The file is only compiled on macOS, and the Metal shader source is compiled when the viewer starts on a Mac, so the macOS CI job (Rust build only) does not prove the shader compiles. Please have it looked at on a Mac before relying on it; a shader error there would stop the Metal viewer from starting. ## Not done on Metal - Per-part roughness and metal: its lighting has no specular term to use them. - Lamps and brake glow.
The Metal renderer showed vehicle part colours (it multiplies the
vertex tint) but not the paint colour on the primary body paint: on
materials coloured per part id, tint alpha 254 marks those vertices.

- Materials coloured per part carry bit 10 in flags.w, as in the wgpu
  renderer, and the fragment shader gives marked vertices the Car paint
  colour.

Not run: written on Windows, where this file is not compiled and the
Metal shader is not built (it is compiled when the viewer starts on a
Mac). The macOS CI job builds the Rust side only. Needs a look on a Mac.

Not done on Metal: per-part roughness and metal (its lighting has no
specular term to use them), lamps, brake glow.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:07:42 +00:00
github manually merged commit bbe82571b2 into gh-pr/73/base 2026-11-26 20:07:44 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.