From bb46352c37f4779bd3b87168bc6b04f41ccfd123 Mon Sep 17 00:00:00 2001 From: Simon Schneegans Date: Mon, 5 Jun 2023 05:27:18 +0200 Subject: [PATCH 1/3] :beetle: Attempt to fix #344 --- src/Shader.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Shader.js b/src/Shader.js index 2e94c3b..6127b7d 100644 --- a/src/Shader.js +++ b/src/Shader.js @@ -180,7 +180,16 @@ var Shader = GObject.registerClass( // We use this vfunc to trigger the update as it allows calling this.get_pipeline() in // the handler. This could still be null if called from the updateAnimation() above. vfunc_paint_target(...params) { - this.emit('update-animation', this._progress); + + // Starting with GNOME 44.2, the alpha channel is not written to by default. We need + // to undo this. It is a pity that we have to do this here, as it is not really + // required to be done each frame. But it's the only place where we can do it. + // https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2650 + if (utils.shellVersionIsAtLeast(44, 2)) { + this.get_pipeline().set_blend( + 'RGBA = ADD (SRC_COLOR * (SRC_COLOR[A]), DST_COLOR * (1-SRC_COLOR[A]))'); + } + this.set_uniform_float(this._uProgress, 1, [this._progress]); super.vfunc_paint_target(...params); } From b2158eb2e28c07bc375eb4a0d8ca383ba99d63fe Mon Sep 17 00:00:00 2001 From: Simon Schneegans Date: Mon, 5 Jun 2023 05:43:44 +0200 Subject: [PATCH 2/3] :beetle: Re-add accidentally deleted line --- src/Shader.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Shader.js b/src/Shader.js index 6127b7d..a910169 100644 --- a/src/Shader.js +++ b/src/Shader.js @@ -180,6 +180,7 @@ var Shader = GObject.registerClass( // We use this vfunc to trigger the update as it allows calling this.get_pipeline() in // the handler. This could still be null if called from the updateAnimation() above. vfunc_paint_target(...params) { + this.emit('update-animation', this._progress); // Starting with GNOME 44.2, the alpha channel is not written to by default. We need // to undo this. It is a pity that we have to do this here, as it is not really From 708b4ca1adf95e5c9a51106d3fb2efa6bc8fde7a Mon Sep 17 00:00:00 2001 From: Simon Schneegans Date: Mon, 5 Jun 2023 05:47:29 +0200 Subject: [PATCH 3/3] :memo: Add changelog entry --- docs/changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog.md b/docs/changelog.md index 3613b11..effac63 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -11,6 +11,7 @@ SPDX-License-Identifier: CC-BY-4.0 #### Bug Fixes +- Fixed an issue on GNOME 44.2 which caused the effects to look broken. It was caused by [this change](https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2650). - Fixed an issue which prevented the settings of the Snap of Disintegration effect from being translatable. ## [Burn My Windows 32](https://github.com/schneegans/Burn-My-Windows/releases/tag/v32)