Skip to content

fix: use true alpha transparency for timeline marker colors#741

Merged
lcottercertinia merged 1 commit intocertinia:mainfrom
lukecotter:feat-tl-marker-color-updates
Mar 9, 2026
Merged

fix: use true alpha transparency for timeline marker colors#741
lcottercertinia merged 1 commit intocertinia:mainfrom
lukecotter:feat-tl-marker-color-updates

Conversation

@lukecotter
Copy link
Contributor

@lukecotter lukecotter commented Mar 9, 2026

Summary

  • Fix marker rendering appearing too bright on dark themes by using true alpha transparency instead of pre-blended opaque colors
  • Update RectangleShader fragment shaders (GLSL + WGSL) to output premultiplied alpha for correct blending with PixiJS 8's default blend mode
  • Consolidate all marker color references to use MARKER_COLORS + MARKER_ALPHA from flamechart.types.ts as the single source of truth
  • Remove duplicate pre-blended color maps from MinimapRenderer, MetricStripRenderer, MarkerProcessor, and metric-strip-colors

Test plan

  • All 720 existing tests pass
  • Visual: Dark theme — markers should look subtle/muted (not overly bright)
  • Visual: Light theme — markers should show as subtle tints
  • Visual: Minimap markers match main timeline marker appearance
  • Visual: Metric strip markers match main timeline marker appearance

Replace pre-blended opaque marker colors with true alpha transparency
using MARKER_COLORS + MARKER_ALPHA from a single source of truth.

- Fix RectangleShader to output premultiplied alpha (rgb * a, a) for
  correct blending with PixiJS 8's default blend mode
- Pass MARKER_ALPHA via vertex data in MeshMarkerRenderer instead of
  mesh.alpha which custom shaders don't consume
- Apply sprite.alpha in TimelineMarkerRenderer for native sprite blending
- Remove duplicate pre-blended color maps from MinimapRenderer,
  MetricStripRenderer, and metric-strip-colors
- All renderers now reference flamechart.types.ts as single source of
  truth for marker colors and alpha

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lcottercertinia lcottercertinia merged commit fb4587b into certinia:main Mar 9, 2026
5 checks passed
@lukecotter lukecotter deleted the feat-tl-marker-color-updates branch March 9, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants