Skip to content

v1.1.21 — Unlit display mode (#77)

Latest

Choose a tag to compare

@gsdali gsdali released this 19 Jun 20:00

Unlit / flat-colour display mode (closes #77)

New DisplayMode.unlit draws each body in its constant base colour with no lighting, ambient, shadows, fresnel, curvature, or tone mapping — so vivid, colour-coded diagnostic / debug renders stay faithful and distinguishable.

Previously OffscreenRenderer .shaded ran every body through the full PBR path (hemisphere ambient + fresnel rim + curvature; ACES tone map on the interactive post-pass), which desaturated and hue-shifted saturated colours — a bright magenta read as green-ish, breaking region colour-coding (e.g. OCCTReconstruct's diagnostic renders).

How it works

  • shaded_fragment early-returns bodyUniforms.color when the new Uniforms.unlit flag is set (clip-plane discard + selection tint still apply).
  • Both OffscreenRenderer and ViewportRenderer set the flag from their displayMode; .unlit routes through the shaded pipeline via showsSurfaces == true. The interactive SSAO / ACES tone-map post-pass is skipped for .unlit.
  • Uniforms gains a uint unlit field (Swift↔Metal in sync; repacked the existing clip-pad tail, stride unchanged).

Verification

New UnlitColorTests: a magenta panel renders faithfully in .unlit (R≈255, G≈38, B≈217) and measurably more saturated than .shaded. 161 tests pass.

Full Changelog: v1.1.20...v1.1.21