Compare commits

...

4 Commits

Author SHA1 Message Date
pszsh 327e0d7dae seam fix attempt: fade anchor-edge alpha to 0 in mirrored mode, restore working 4-pass render loop 2026-02-27 02:21:26 -08:00
pszsh d78c85d4ad fix mirror seam: single-pass rendering with CPU-side vertex expansion
Instead of 4 MVP passes that double-draw at mirror boundaries (causing
bright seam from overlapping semi-transparent bars), expand the half-size
vertices into all 4 quadrants on the CPU by flipping coordinates. Draw
everything in a single pass with one full-screen ortho MVP. Each pixel is
now covered by exactly one quadrant's geometry — no overlap, no seam.

Also simplifies render: removes 4-pass loop, removes separate cepstrum
MVP slot (shares slot 0).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 02:06:05 -08:00
pszsh 840fe5a11f fix horizontal seam: extend half-height by 2px for vertical overlap at mirror seam
Same approach as the horizontal overlap (55% width) — the half-canvas
now extends 2 pixels past the midline so top/bottom quadrants overlap
slightly, covering rounding/rasterization gaps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 22:17:48 -08:00
pszsh 632b6e4112 Trying to fix the middle seam bug, want to keep track of what I've tried already (not fixed yet) 2026-02-26 17:29:59 -08:00
2 changed files with 11 additions and 5 deletions

View File

@ -677,28 +677,32 @@ void VisualizerWidget::buildVertices(int w, int h) {
float fr = fillColor.redF(), fg = fillColor.greenF(), float fr = fillColor.redF(), fg = fillColor.greenF(),
fb = fillColor.blueF(), fa = fillColor.alphaF(); fb = fillColor.blueF(), fa = fillColor.alphaF();
// In mirrored mode, fade anchor edge to transparent to hide mirror seam
float faAnchor = m_mirrored ? 0.0f : fa;
// Triangle 1 // Triangle 1
m_vertices.insert(m_vertices.end(), m_vertices.insert(m_vertices.end(),
{x1, anchorY, fr, fg, fb, fa, x1, y1, fr, fg, fb, fa, {x1, anchorY, fr, fg, fb, faAnchor, x1, y1, fr, fg, fb, fa,
x2, y2, fr, fg, fb, fa}); x2, y2, fr, fg, fb, fa});
// Triangle 2 // Triangle 2
m_vertices.insert(m_vertices.end(), m_vertices.insert(m_vertices.end(),
{x1, anchorY, fr, fg, fb, fa, x2, y2, fr, fg, fb, fa, {x1, anchorY, fr, fg, fb, faAnchor, x2, y2, fr, fg, fb, fa,
x2, anchorY, fr, fg, fb, fa}); x2, anchorY, fr, fg, fb, faAnchor});
m_fillVertexCount += 6; m_fillVertexCount += 6;
float lr = lineColor.redF(), lg = lineColor.greenF(), float lr = lineColor.redF(), lg = lineColor.greenF(),
lb = lineColor.blueF(), la = lineColor.alphaF(); lb = lineColor.blueF(), la = lineColor.alphaF();
float laAnchor = m_mirrored ? 0.0f : la;
// Left edge // Left edge
lineVerts.insert(lineVerts.end(), lineVerts.insert(lineVerts.end(),
{x1, anchorY, lr, lg, lb, la, x1, y1, lr, lg, lb, la}); {x1, anchorY, lr, lg, lb, laAnchor, x1, y1, lr, lg, lb, la});
// Right edge (last bin only) // Right edge (last bin only)
if (i + 2 == freqs.size()) { if (i + 2 == freqs.size()) {
lineVerts.insert( lineVerts.insert(
lineVerts.end(), lineVerts.end(),
{x2, anchorY, lr, lg, lb, la, x2, y2, lr, lg, lb, la}); {x2, anchorY, lr, lg, lb, laAnchor, x2, y2, lr, lg, lb, la});
} }
} }
} }

View File

@ -68,6 +68,8 @@ private:
int m_targetFps = 60; int m_targetFps = 60;
qint64 m_lastFrameTime = 0; qint64 m_lastFrameTime = 0;
bool m_dataDirty = false; bool m_dataDirty = false;
int m_lastBuildW = 0;
int m_lastBuildH = 0;
// RHI resources // RHI resources
QRhi *m_rhi = nullptr; QRhi *m_rhi = nullptr;