Skip to content

Feat/transition anim#3531

Open
Atan-D-RP4 wants to merge 6 commits intoniri-wm:mainfrom
Atan-D-RP4:feat/transition-anim
Open

Feat/transition anim#3531
Atan-D-RP4 wants to merge 6 commits intoniri-wm:mainfrom
Atan-D-RP4:feat/transition-anim

Conversation

@Atan-D-RP4
Copy link

@Atan-D-RP4 Atan-D-RP4 commented Feb 27, 2026

Intending to implement full animations for the do-screen-transition action with custom-shader support.
Relevant discussion: #1620

Also, passes in the cursor position as uniform to the shader unlike the window-open/close/resize shaders.

The use-case is that I wanted more effects for workspace switch while overview is not enabled.

Extending the existing switch animation does not make sense design-wise and this action existed so this felt like a pretty natural workaround.

260227_21h55m23s_recording.mp4

@Atan-D-RP4 Atan-D-RP4 force-pushed the feat/transition-anim branch from 4fb4154 to 288e167 Compare March 1, 2026 19:07
@Atan-D-RP4 Atan-D-RP4 marked this pull request as ready for review March 1, 2026 19:07
Copilot AI review requested due to automatic review settings March 1, 2026 19:07
@Atan-D-RP4
Copy link
Author

Atan-D-RP4 commented Mar 1, 2026

It kinda works.

260310_21h16m41s_recording.mp4

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Implements configurable screen transition animations for the do-screen-transition action, including optional custom GLSL shader support to render the transition effect (useful for workspace switching effects outside overview).

Changes:

  • Reworks ScreenTransition to be driven by Animation config (with delay support) and optionally render via a custom shader program.
  • Adds shader plumbing for a new ScreenTransition program type, including prelude/epilogue fragments and config-driven compilation/loading.
  • Extends configuration and docs to expose animations.screen-transition with custom-shader.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/ui/screen_transition.rs Moves from hardcoded crossfade timing to configurable animation and adds shader-based rendering path with uniforms.
src/render_helpers/shaders/screen_transition_prelude.frag Defines the uniform/varying interface exposed to custom screen transition shaders.
src/render_helpers/shaders/screen_transition_epilogue.frag Provides the standardized main() wrapper calling screen_transition_color(...).
src/render_helpers/shaders/mod.rs Adds ProgramType::ScreenTransition, storage, and compilation/loading of custom screen transition shaders.
src/niri.rs Wires config reload + rendering callsite (incl. passing per-output mouse position) and uses new animation config when triggering transitions.
src/backend/winit.rs Loads configured screen transition shader at backend init.
src/backend/tty.rs Loads configured screen transition shader at backend init.
niri-config/src/animations.rs Introduces ScreenTransitionAnim with anim and custom_shader, plus decoding/merging.
niri-config/src/lib.rs Updates config tests/fixtures to include the new screen_transition animation defaults.
docs/wiki/examples/screen_transition_custom_shader.frag Adds documented example shader + uniform interface description and sample effects.
docs/wiki/Configuration:-Animations.md Documents screen-transition and custom-shader configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Atan-D-RP4 Atan-D-RP4 force-pushed the feat/transition-anim branch from 08237ea to b70c994 Compare March 9, 2026 17:44
@Sempyos Sempyos added area:visuals Animations, shaders, visual artifacts area:config Config parsing, default config, new settings pr kind:feature New features and functionality labels Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:config Config parsing, default config, new settings area:visuals Animations, shaders, visual artifacts pr kind:feature New features and functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants