Skip to content

Shader support in scripted effects

Credits for this work go to the Burn my windows GNOME Shell Extension. When looking into how they do it I saw that they support shaders from javascript code and I thought "hey that is neat".

This merge request extends the AnimateEffect to support GLShader. The ScriptedEffect exposes new API to create a shader and uses the new functionality in the AnimateEffect. More information on how to use it in an effect package is in the commit message.

I tested the functionality by adjusting the scale effect to use the fragment shader of the invert effect. The adjusted JavaScript file is attached.

main.js

I am totally open to any suggestions especially from API usage point of view.

Merge request reports

Loading