Bug 454408 - Zoom effect isn't smoothed anymore
Summary: Zoom effect isn't smoothed anymore
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (show other bugs)
Version: 5.24.90
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-05-25 20:40 UTC by Nate Graham
Modified: 2022-05-27 14:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2022-05-25 20:40:39 UTC
Until https://invent.kde.org/plasma/kwin/-/merge_requests/2451, the image displayed by the Zoom effect was smoothed. Not it isn't anymore, and it's pixelated instead. I suspect because of using nearest neighbor scaling:

        data->texture->setFilter(GL_NEAREST);
Comment 1 Vlad Zahorodnii 2022-05-26 06:51:17 UTC
Heh, yeah, I made it GL_NEAREST intentionally, thinking that "pixel granularity" would be nicer.
Comment 2 Bug Janitor Service 2022-05-26 06:54:34 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/2471
Comment 3 Vlad Zahorodnii 2022-05-26 11:02:37 UTC
Git commit 37a8358ed7134845b47e7f206f53c710b943f678 by Vlad Zahorodnii.
Committed on 26/05/2022 at 11:02.
Pushed by vladz into branch 'Plasma/5.25'.

effects/zoom: Use GL_LINEAR filter

The magnification filter was changed to GL_NEAREST with the reasoning
that "pixel granularity" would be more correct. Perhaps that was not a
bright idea. Change it back to GL_LINEAR.
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2471>


(cherry picked from commit 6a5173b6c40a2d2e7ed240aaf96adce1a2d9c9fb)

M  +1    -1    src/effects/zoom/zoom.cpp

https://invent.kde.org/plasma/kwin/commit/37a8358ed7134845b47e7f206f53c710b943f678
Comment 4 ratijas 2022-05-27 08:24:36 UTC
> Heh, yeah, I made it GL_NEAREST intentionally, thinking that "pixel granularity" would be nicer.

It would be nice for scenarios like a zoomed area of a color picker :)

Thanks for a quick fix!
Comment 5 Nate Graham 2022-05-27 12:22:20 UTC
IIRC the macOS zoom effect has a keyboard shortcut to switch between smoothed and pixelated, because, yeah, sometimes you do want to see exact pixels. But other times you don't. Might be nice to have that here too.
Comment 6 ratijas 2022-05-27 14:16:16 UTC
> IIRC the macOS zoom effect has a keyboard shortcut to switch between smoothed and pixelated, because, yeah, sometimes you do want to see exact pixels. But other times you don't. Might be nice to have that here too.

Indeed, there was such an option. Global shortcuts train goes choo-choohh?