Open
Conversation
4fb4154 to
288e167
Compare
Author
|
It kinda works. 260310_21h16m41s_recording.mp4 |
There was a problem hiding this comment.
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
ScreenTransitionto be driven byAnimationconfig (with delay support) and optionally render via a custom shader program. - Adds shader plumbing for a new
ScreenTransitionprogram type, including prelude/epilogue fragments and config-driven compilation/loading. - Extends configuration and docs to expose
animations.screen-transitionwithcustom-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.
08237ea to
b70c994
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intending to implement full animations for the
do-screen-transitionaction 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