Skip to content

Enable smooth filtering and mipmapping on BackgroundMedia image - #14263

Open
AnPod wants to merge 2 commits into
omacom:quattrofrom
AnPod:fm/omarchy-ten-issue-fixes-13958
Open

AnPod wants to merge 2 commits into
omacom:quattrofrom
AnPod:fm/omarchy-ten-issue-fixes-13958

Conversation

@AnPod

@AnPod AnPod commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #13958

Problem

When high-resolution wallpapers (e.g. 4K/6K images) are downscaled to screen resolution, the background renders with noticeable aliasing grain and noise across dark and smooth gradient areas. In shell/Ui/BackgroundMedia.qml, the Image component did not specify smooth: true or mipmap: true, resulting in unfiltered downsampling.

Solution

Enable smooth: true and mipmap: true on the Image within BackgroundMedia.qml. This matches the filtering configuration already used on transition frames (oldFrame and incomingFrame in Background.qml) and eliminates the downscaling grain.

Validation

  • Added unit assertion in test/shell.d/background-test.sh verifying that BackgroundMedia.qml enables smooth and mipmap.
  • Ran bash ./test/shell.d/background-test.sh (all 14 assertions passed).

@greptile-apps

greptile-apps Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the conflicting test assertion has been corrected.

Summary

Enables smooth filtering and mipmapping for still-image backgrounds and updates the corresponding test assertions. The latest change removes the conflicting assertion identified in the previous review.

Reviews (3) · Last reviewed commit: "Update video-background-test to assert m..." · Reviewed by Greptile

Comment thread test/shell.d/background-test.sh Resolved

@chessing234 chessing234 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

everything seems fine, ready to merge.

AnPod added 2 commits October 11, 2026 07:39
When high-resolution wallpapers are downscaled to screen resolution, unfiltered downsampling causes aliasing noise and grain across smooth and dark gradient areas. Enabling smooth filtering and mipmapping on BackgroundMedia matches the settings used on the transition frames and ensures clean rendering.

Fixes omacom#13958
@AnPod
AnPod force-pushed the fm/omarchy-ten-issue-fixes-13958 branch from c4b2426 to 7f5882b Compare October 11, 2026 05:45
@omarchybot

Copy link
Copy Markdown
Collaborator

I read this against quattro at 7f5882b, but have not classified or tested it yet. Classification needs two models to agree, and the second opinion (Codex Medium) was unavailable for this run because the reviewer's daily cap had been reached. The reviewer itself answers. So this has no label for now, and it will be classified and run on a worker when it comes round again.

What the source shows so far, from my reading alone: #13958 describes the 4.0.4 background, where the wallpaper was decoded at native size and the GPU shrank it about 5.5× without mipmaps. On quattro, #13408 (f3dbc46) changed that. Both callers of BackgroundMedia set constrainDecode. The desktop decodes at the panel's physical size (shell/plugins/background/Background.qml:332-341, :366-367), and the lock screen decodes at its own size and blurs the result (shell/plugins/lock/LockView.qml:114-115). With both sourceSize dimensions set and PreserveAspectCrop, the decoded texture is drawn at roughly 1:1 or enlarged, never shrunk much. Mipmaps only change shrunk textures, so on quattro I expect mipmap: true here to make no visible difference. It would still cost a mipmap chain (about a third more texture memory) for every wallpaper. smooth already defaults to true for Image in Qt 6. Also, test/shell.d/video-background-test.sh had asserted that this path leaves mipmapping off on purpose; this pull request reverses that assertion. A worker comparison of the same large wallpaper on quattro and on this head is what will settle whether the grain still shows.

Next: the second classification and a worker comparison on a later run. After that, the maintainer decides.

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.

Background wallpaper renders grainy due to missing mipmaps on base Image

3 participants