Context
Follow-up from shader playback audit (PR #268). WebGL overlay now applies octaveBrightness() so the same pitch class shares hue across octaves but gets brighter in higher octaves (0.65 at C-0 → 1.0 at B-9), matching patternv0.50.wgsl.
Older LED shaders still use pitch-class color only — C-3 and C-5 look identical.
Scope
Add octaveBrightness(note) and apply it wherever note color is computed in:
shaders/patternv0.46.wgsl
shaders/patternv0.47.wgsl
shaders/patternv0.48.wgsl
Reference implementation:
fn octaveBrightness(note: u32) -> f32 {
if (note == 0u || note > NOTE_MAX) { return 1.0; }
let oct = (note - 1u) / 12u; // 0..9
return 0.65 + 0.35 * f32(oct) / 9.0;
}
Then run npm run sync:shaders to copy into public/shaders/.
Acceptance criteria
Related
Context
Follow-up from shader playback audit (PR #268). WebGL overlay now applies
octaveBrightness()so the same pitch class shares hue across octaves but gets brighter in higher octaves (0.65at C-0 →1.0at B-9), matchingpatternv0.50.wgsl.Older LED shaders still use pitch-class color only — C-3 and C-5 look identical.
Scope
Add
octaveBrightness(note)and apply it wherever note color is computed in:shaders/patternv0.46.wgslshaders/patternv0.47.wgslshaders/patternv0.48.wgslReference implementation:
Then run
npm run sync:shadersto copy intopublic/shaders/.Acceptance criteria
Related
docs/planning/trigger-sustain-tails.md