Skip to content

Colormap by Keys

A colormap is decided by integer comparisons against keys derived once from the CPU reference, so every shader and adapter gives the same colours as the reference.

Field Value
ID REN-14
Status Shipped
Scope Core
Pillar Rendering and 3-D
Sprint None
Depends On WebGPU Backend of the Graphics Layer (REN-13)
Unblocks Scene View (REN-12)
More Colormaps (REN-22)
Texture Path on the Graphics Layer (REN-33)
Docs Graphics Layer, Colormap by Keys
Branches None
Design None

Coverage Ledger

  • Branch sprint4-build, 165 commits, none outside sprint4-integ3. Head of pull request 1 (546bacaa): sprint 4 through demo 0 with every review fix.
  • Branch sprint4-cmap, 75 commits, none outside sprint4-integ3. Colormap by keys, first form.
  • Branch sprint4-cmapint, 113 commits, none outside sprint4-integ3. Colormap by keys integrated with the scene view.
  • Branch sprint4-integ3, 209 commits not on main, the superset of the finished build branches; the six branches draws, rec, tex, time, ts9, points hold 30 commits outside it. Third integration branch: every finished build branch (protocol 3.2 series, step 5, 7, 9, scale bar, up-axis, rest of scene calls, first draws commit).
  • Branch sprint4-pr1-main2, 165 commits, none outside sprint4-integ3. Pull request 1 candidate, 546bacaa with main merged in.
  • Branch sprint4-integ3, c61ce977, 111cdeb8, c1f24435, 73392d01, cf644939, 8486a08a, 553a9ed8, 7d8d34cd, 153f3b6a, 147b4e04, 2f8658d5, 06e2e2e6, 35c89d71, 5c584db9, e95d8d26, 4eba8c7f. The colormap by keys, a colormap decided by integer comparisons against keys from the CPU reference, in the 4,112-byte block, with a compute program, Metal and browser rows and exhaustive tests over every float.
  • Branch sprint4-integ3, 750edb30, a10865e4, f558ab1a, 1d1538e7, 7341775c, e55a98ad, 42c5161e, ad2f005b, a4600345, 19f47158. Colormap measurements and docs: timing rows, step 6 results, deriving cost, resident memory, the decision for keys everywhere.
  • design/renderer-core.md on the branch sprint4, under Exact colormap output. Colormaps decided by integer comparisons against keys from the CPU reference, with a 4,112-byte block per mapping, proven over all 2^32 inputs on 14 ranges.
  • design/renderer-core.md on the branch sprint4, under The steps. Step 6, colormap by keys, with the exhaustive CPU test and boundary rows; 2 days.
  • design/renderer-core.md on the branch sprint4, under Decisions. Decisions on WGSL as the one source through Naga, hand-written native versions, CUDA kernels, integer keys for the colormap, conventions, no immediate data, and ImGui keeping its backends.
  • design/sprint-4.md on the branch sprint4, under 1. A loss landscape in a notebook. The colormap blocks, cached by range (0.5 of 1 day).
  • design/sprint-4.md on the branch sprint4, under 1. A loss landscape in a notebook. Step 6, browser half: the key derivation in the shared C++ header, exhaustive CPU test, integer decision in the browser's WGSL (1.5 of 2 days).
  • design/sprint-4.md on the branch sprint4, under 2. The landscape in the app, the end of OpenGL, and the views on the layer. Step 6, native rows: the colormap by keys on Metal through the generated program (0.5 of 2 days).
  • design/sprint-4.md on the branch sprint4, under Decisions. Increments in order, the whole minimum cut first, then the loss landscape, then every remaining migration step; the subset of increment 1 is what demo 0 draws; the network route only in increment 1; the box and floor grid as ordinary line draws; step 6 in two halves.
  • design/web-geometry.md on the branch sprint4, under Colour. Colour by integer keys and class table lookup in WebGPU.
  • design/web-geometry.md on the branch sprint4, under Helpers and the colormap. Helpers and the integer-key colormap in WGSL.
  • design/web-geometry.md on the branch sprint4, under Work items. Class table texture and cached colormap blocks; 1 day.
  • design/web-geometry.md on the branch sprint4, under Decisions. Decisions on vertex buffers, the parameter block, colour source, colormap by keys, bits textures, line and arrow quads, index-pair edge gather, box poses, flat faces, pick pass, index clamp, flat interpolation, level of detail at the producer and default limits.
  • design/windows-parity.md on the branch sprint4-pr1-main2, under 7. Renderer fallbacks. The CUDA direct kernel rewritten from the shared colormap header, deciding by integer keys (1 day).
  • Orchestrators' notes, _notes/HANDOFF-sprint4.md. Pull request 1 content is finished and held on sprint4-pr1-main2 at 44840c5b: graphics layer, shader generation, scene core, scene view, WebGPU backend, colormap by keys, protocol 3.2 subset, caliper.scene and demo 0.
  • Orchestrators' notes, _notes/HANDOFF-sprint4.md. Decision: colormap keys everywhere in the cheaper exact form, a 4,112-byte block with integer comparisons exact against the CPU reference.
  • Orchestrators' notes, _notes/HANDOFF-sprint4.md. Decision: the new texture path takes the CPU reference's level where the old fast-math shader was one level off in 8 cases.
  • Orchestrators' notes, s4-cmap/STATUS.md. A shared key derivation and a cache of key blocks (colormap_keys.h), then the cheaper exact 4,112-byte block with per-program fast math.
  • Orchestrators' notes, s4-cmapint/STATUS.md. Step 6 integrated onto the integration head as 26 commits; the scene view owns its cache and scene_colormap_keys.h is deleted.
  • Orchestrators' notes, s4-cmapint/RESULT.md. Exhaustive colormap tests over 60,129,542,144 inputs on the CPU and on Metal, with the memory measured first; the timing row shows +2.5 and +6.4 microseconds for 1,024 and 2,048 squared heatmaps.
  • Orchestrators' notes, s4-cmapint/RESULT.md. The WebGPU renderer's heatmap pass is not moved to keys here; step 8 replaces the texture path.

Roadmap Graph Feature in Graph