summaryrefslogtreecommitdiff
path: root/src/effects
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-16 23:54:15 +0100
committerskal <pascal.massimino@gmail.com>2026-02-16 23:54:15 +0100
commit340dd11c44077ac121f9da27752ae97b3b7566e8 (patch)
treeb19052b760b379718fc10497c41fa2e175ac7d96 /src/effects
parent3b2bee705cfe5a250bb6049a90b5d734d3125f73 (diff)
fix: correct Heptagon effect rendering and SDF implementation
- Change draw call from 21 to 3 vertices (fullscreen triangle) - Replace broken folding-based SDF with IQ's atan-based regular polygon formula - Simplify test timeline to render Heptagon directly to sink - Reduce heptagon radius from 0.5 to 0.3 for better visibility The effect was not visible due to incorrect vertex count and broken SDF returning negative values everywhere (showing only fill color). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'src/effects')
-rw-r--r--src/effects/heptagon_effect.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/effects/heptagon_effect.cc b/src/effects/heptagon_effect.cc
index 755b6e3..1bc9d06 100644
--- a/src/effects/heptagon_effect.cc
+++ b/src/effects/heptagon_effect.cc
@@ -77,7 +77,7 @@ void Heptagon::render(WGPUCommandEncoder encoder,
WGPURenderPassEncoder pass = wgpuCommandEncoderBeginRenderPass(encoder, &pass_desc);
wgpuRenderPassEncoderSetPipeline(pass, pipeline_);
wgpuRenderPassEncoderSetBindGroup(pass, 0, bind_group_, 0, nullptr);
- wgpuRenderPassEncoderDraw(pass, 21, 1, 0, 0); // 7 triangles * 3 vertices
+ wgpuRenderPassEncoderDraw(pass, 3, 1, 0, 0); // Fullscreen triangle
wgpuRenderPassEncoderEnd(pass);
wgpuRenderPassEncoderRelease(pass);
}