[BUG] The rounded corners of the controls appear to have blurring/softening issues
Submission checklist
- [x] I have searched existing issues and confirmed this is not a duplicate.
- [x] I am using the latest available version of Noctalia.
Bug description
The rounded corners of the control exhibit noticeable blurring/aliasing issues.
Some screenshots:
(top is v4, bottom is v5)
(V5) VS
(V4)
(V5) VS
(V4)
In all the controls mentioned above, every rounded corner in V5 has a strange blurring and smearing issue. This looks like a problem with anti-aliasing or something else going wrong.
I have already searched for possible duplicate issues: #3493, #3746. Unfortunately, none of the above issues match the problem I am experiencing—setting blur and xray does not resolve this issue.
Steps to reproduce
Just launch Noctalia.
Expected behavior
Like V4, the rounded corners are clear.
Actual behavior
Rounded corners have a strange blur and softening effect.
Logs / error output
Noctalia version
v5.0.0 (c7abdb8e7)
Compositor
Niri
Distribution
NixOS
Environment information
Installation method: source code (`nix develop` environment)
GPU: Intel Arc Pro 130T/140T @ 2.25 GHz [Integrated]
Additional context
Also tested on Hyprland, and the same issue can be reproduced.
I don't think this is a bug with the control itself, but rather an issue with the wrapper frame. At least on my end, it looks perfectly fine when no outer frame is used.
![]()
I don't think this is a bug with the control itself, but rather an issue with the wrapper frame. At least on my end, it looks perfectly fine when no outer frame is used.
I do not agree with your view.
If you look closely, the blurring is still present. I only used the border for easier observation.
I don't rule out that this is a feature, but at least in other cases, I would expect it not to be this blurry.
I used AI to write a simple fix. I won't attempt to submit a pull request for now.
Written by AI
Root cause
This is a regression introduced by the v4 → v5 renderer rewrite. In v5 every rounded rectangle is drawn by the signed-distance-field (SDF) shader in src/render/programs/rect_program.cpp.
The anti-aliasing transition window is selected inside coverage_for(): lo = mix(-0.5, -aa_curve, is_corner) / hi = mix(0.5, aa_curve, is_corner), with aa = max(u_softness, 0.85) and u_softness defaulting to 1.0 (RoundedRectStyle::softness, src/render/core/render_styles.h:95).
- Straight edges (
is_corner = 0) →±0.5window → 1 px transition (pixel-snapped, crisp) - Corners (
is_corner = 1) →±1.0window → 2 px transition
So corners get a 2× wider anti-aliasing band than straight edges. A numeric simulation that mirrors the shader exactly (40×40 rect, radius 8, softness 1.0) measures the 10% → 90% alpha transition at 2.64 px on corners versus 0.61 px on edges. Under fractional scaling (1.25–1.5×) that becomes 3–4 physical pixels, which reads as a blur/smear on every rounded control. The blur / xray settings (background blur) are unrelated to this alpha gradient, so they cannot fix it.
The asymmetry originates from commit 598000b76 ("dont AA on the horizontal edges to avoid creating gaps on attached elements"): it pixel-snapped straight edges to remove seams between attached panels, but left the corners on the wide AA window. v4 (QML/Qt) rendered corners with a uniform sub-pixel AA, so corners stayed sharp.
Fix
Decouple shape-edge AA from shadow softness: corners and straight edges now share the same ±0.5 px crisp window, while the outer-shadow path keeps aa = max(u_softness, 0.85) (softness doubles as a fake Gaussian blur radius for shadows — src/shell/surface/shadow.cpp:35, src/shell/bar/bar.cpp:3086).
coverage_for() simplifies to a single smoothstep(-0.5, 0.5, distance), and the now-unused is_corner component of the SDF return value is no longer consumed for coverage.
Verification
- Re-ran the shader simulation: the corner transition drops from 2.64 px → 1.27 px, matching the straight-edge magnitude (the small residual is inherent to a curved SDF scanned along a straight line).
- Shadow rendering is untouched — it still consumes
softnessfor its blur.
And the corresponding patch: 1.patch
Here are some examples of how it looks after the fix:
This is a regression introduced in commit 598000b76 ("rectshader: dont AA on the horizontal edges to avoid creating gaps on attached elements").
That commit changed the straight-edge anti-aliasing to snap to the pixel grid (±0.5px), but rounded corners still use an AA width of max(u_softness, 0.85). When softness is at the default of 1.0, the corner AA width ends up twice as wide as the straight-edge AA, making the corners visually much blurrier than the edges.
I fixed it in a non-intrusive way. The images above show the result after (first) and before (second) the fix.
If it looks good, I'll submit a PR.