Skip to content

Fix premultiplied-alpha double-multiply crushing filter passband shading (#3294). Principle VIII.#3297

Merged
jensenpat merged 1 commit into
mainfrom
aetherclaude/issue-3294
Jun 2, 2026
Merged

Fix premultiplied-alpha double-multiply crushing filter passband shading (#3294). Principle VIII.#3297
jensenpat merged 1 commit into
mainfrom
aetherclaude/issue-3294

Conversation

@aethersdr-agent

Copy link
Copy Markdown
Contributor

Summary

Fixes #3294

What was changed

Fix premultiplied-alpha double-multiply crushing filter passband shading (#3294). Principle VIII.

Files modified

  • src/gui/SpectrumWidget.cpp
 src/gui/SpectrumWidget.cpp | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

Generated by AetherClaude (automated agent for AetherSDR)


🤖 aethersdr-agent · cost: $5.5714 · model: claude-opus-4-8

…ing (#3294). Principle VIII.

The GPU overlay compositor (m_ovPipeline) samples premultiplied QImages
(Format_RGBA8888_Premultiplied) and overlay.frag emits the texel as-is,
but the pipeline blend used srcColor = SrcAlpha — multiplying the already-
premultiplied texel by alpha a second time (color × alpha squared). This
crushed the passband fill (alpha 35/255: intended 13.7% -> actual 1.9%)
below the visible floor while the brighter filter edge lines (alpha 130/255:
51% -> 26%) survived — an exact match for the reported symptom (fill gone,
edges still toggle). Correct premultiplied compositing uses srcColor = One.

Scope: applied to m_ovPipeline only. The FFT fill/line pipelines
(m_fftFillPipeline / m_fftLinePipeline) keep SrcAlpha because they source
from non-premultiplied baked vertex colors. The opaque bg quad (alpha=255)
is unaffected since SrcAlpha == One at full alpha.

Evidence-driven diagnosis: the fill-vs-edge survival ratio matches an
alpha-squared double-multiply numerically; shading draw code is byte-for-byte
unchanged since v26.5.3, and the symptom is GPU-path-only (software
QPainter SourceOver does correct premultiplied math).

Blast radius: local edit — single blend-factor enum inside the private
initOverlayPipeline() helper (one call site). No public signature, member
layout, or cross-TU symbol change; flagged high-betweenness callers
(MainWindow construct/wire paths) do not depend on internal GPU blend setup.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jensenpat

Copy link
Copy Markdown
Collaborator

Color change goes against previous comment about vertex fills. Holding until I can test.

@jensenpat jensenpat marked this pull request as draft May 31, 2026 05:12
auto-merge was automatically disabled May 31, 2026 05:12

Pull request was converted to draft

@jensenpat jensenpat marked this pull request as ready for review June 2, 2026 13:19

@jensenpat jensenpat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shader fix for passband contrast.

@jensenpat jensenpat merged commit af68d3d into main Jun 2, 2026
5 checks passed
@jensenpat jensenpat deleted the aetherclaude/issue-3294 branch June 2, 2026 13:20
G6PWY-Chris pushed a commit to G6PWY-Chris/AetherSDR that referenced this pull request Jun 22, 2026
…ing (aethersdr#3294). Principle VIII. (aethersdr#3297)

## Summary

Fixes aethersdr#3294

### What was changed

Fix premultiplied-alpha double-multiply crushing filter passband shading
(aethersdr#3294). Principle VIII.

### Files modified

- `src/gui/SpectrumWidget.cpp`

```
 src/gui/SpectrumWidget.cpp | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
```

---
Generated by AetherClaude (automated agent for AetherSDR)

---
<sub>🤖 aethersdr-agent · cost: $5.5714 · model: claude-opus-4-8</sub>

Co-authored-by: aethersdr-agent[bot] <273844287+aethersdr-agent[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.

Filter shading gone on today's commit 5a2c0e6b73beb2242baed266efbad46c8031f8a1 on Windows

1 participant