Repository navigation
Port shader effects to GNOME Shell 51 and declare support - #319
Merged
dsheeler merged 1 commit intoOct 9, 2026
Merged
Conversation
- radialShader: use Clutter.ShaderEffect with vfunc_get_static_snippet() and Cogl.Snippet.new(), uniforms set by name - color/glitch effects: replace removed set_shader_source() with vfunc_get_static_snippet() - metadata: declare shell-version 51 (get_static_snippet is new in mutter 51)
|
This works , tested on arch |
Owner
|
Hi @camiloeferrera, @gonwe, and @LavaTiger99: thanks so much for the work on getting the gl effects sorted out for GNOME 51. I will do a bit more testing, but if all goes well, I will merge this PR which incorporates all of your efforts. Thank you!!! |
Owner
Thanks @Neo-29 for testing! |
|
This works , tested on Bazzite 45 |
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.
GNOME Shell 51 removed
Shell.GLSLEffectandClutter.ShaderEffect.set_shader_source(), which breaks the extension on 51 (see #317):This ports all three shader effects to the 51 API and declares support:
radialShader.js— extendsClutter.ShaderEffect, builds the fragment pipeline invfunc_get_static_snippet()withCogl.Snippet.new(), and sets uniforms by name viaset_uniform_float(name, n_components, values).color_effect.js/glitch_effect.js— replaces the removedset_shader_source()withvfunc_get_static_snippet()(declarations /main()body split from the existing.glslfiles).metadata.json—shell-version: ["51"].Credit: the approach and the color/glitch port follow the reference patch and test evidence posted by @LavaTiger99 in #318. Thanks also to @gonwe for the initial radial shader port there. Opening this as a PR because the code in #318 as it stands uses
new Cogl.Snippet(...)andset_uniform_value('brightness', <number>), both of which throw on the final GNOME 51 introspected API (Cogl.Snippet.new()is the introspectable constructor, andset_uniform_float()takes exactly(name, n_components, values)— the array length is consumed automatically).Testing
CachyOS, GNOME Shell 51.0 / Mutter 51.0, Wayland (upgraded from 50):
GLSLEffectTypeError above).vfunc_get_static_snippet()+ named uniforms run clean, no GJS warnings.Note: this is intentionally a GNOME 51-only port —
get_static_snippetdoes not exist in mutter 50, andset_shader_sourceno longer exists in 51, so preserving 50 support would require a runtime version check with both code paths. Glad to adjust if you'd prefer that.