Skip to content

shader-based scrolling wallpaper mode#1802

Open
PandorasFox wants to merge 5 commits intoAvengeMedia:masterfrom
PandorasFox:master
Open

shader-based scrolling wallpaper mode#1802
PandorasFox wants to merge 5 commits intoAvengeMedia:masterfrom
PandorasFox:master

Conversation

@PandorasFox
Copy link

@PandorasFox PandorasFox commented Feb 23, 2026

some notes:

  • needs to be run with QSG_USE_SIMPLE_ANIMATION_DRIVER=1 qs -p quickshell if your display refresh rate is >60hz (rolled into the .service file, potentially undesirable on devices that might want to throttle based on battery status? needs investigation beyond the desktop case..)
  • plays nice with Lockscreen shader positioning, but haven't tested the greeter (seems fine/non-impacting since the greeter is an earlier stage?)
  • haven't tested edge cases with display plugs/mode changes

overall much happier with this approach than the lazy software render impl; did require some boilerplating of the 8th fill mode across the shaders.

PandorasFox and others added 3 commits February 22, 2026 16:06
…pport

Add "Scrolling" fill mode that scrolls the wallpaper based on active
workspace, creating a parallax effect across workspaces.

Features:
- Shader-based spring animation with smooth updates
- Supports both Niri (vertical) and Hyprland (horizontal) scrolling
- Skip transitions in scrolling mode (incompatible with parallax UV)

Performance fixes:
- Set QSG_USE_SIMPLE_ANIMATION_DRIVER=1 to unlock 240Hz+ frame rates
  (Qt's vsync-based driver was locking FrameAnimation to 60Hz)
- Move spring physics from GPU (per-pixel) to CPU (per-frame)
- Disable mipmaps on parallax textures (saves ~33% memory bandwidth)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When parallax scrolling is active, the lock screen now shows the same
wallpaper crop position as the current workspace instead of a centered
crop. This creates visual continuity when locking the screen.

Changes:
- Add monitorScrollPositions storage to SessionData with get/set/clear
- Add getShaderFillMode() to Theme.qml for shader fillMode values
- WallpaperBackground publishes scroll position on animation settle
- Add fillMode 7 (Scroll) to all transition shaders' calculateUV()
- LockScreenContent uses ShaderEffect with scroll-aware UV calculation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Initialize scroll position at (0, 0) instead of centered (50, 50) to
avoid showing the image in 'fit' mode with pillarboxing before the UV
scroll position is calculated. The first workspace update now uses a
stiffer spring animation to quickly snap to the intended position.

- Hide currentWallpaper when in scrolling mode to prevent Image.Pad flash
- Reset scroll state when wallpaper changes or scrolling mode toggles
- Use damping: 200, stiffness: 8000 for initial snap-to animation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
PandorasFox and others added 2 commits February 22, 2026 17:26
… mode

The niri overview blur was sourcing from the raw currentWallpaper image,
which is invisible and has no scroll-aware UV cropping in parallax mode.
Now falls through to parallaxLoader.item when active, producing a
correctly framed blur that matches the on-screen wallpaper crop.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@PandorasFox
Copy link
Author

rebased for 85b00d3, i think checks should pass now

@bbedward
Copy link
Collaborator

bbedward commented Mar 1, 2026

Sorry, havent had time to take a look at this - will get to it soon.

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.

2 participants