webcamoid icon indicating copy to clipboard operation
webcamoid copied to clipboard

Allow loading user made effects

Open hamoid opened this issue 4 years ago • 1 comments

new feature

As mentioned in https://github.com/webcamoid/webcamoid/issues/277#issuecomment-615916854 it would be great if users could add their own GLSL effects to Webcamoid without having to recompile it.

There are different ways to implement this. One could be a plugin, maybe called "user effects" that provides a way to load effects. Those effects could be

  • a textarea where to write GLSL code
  • a dropdown showing effects (shader files) located in a folder

The user-effects plugin could build a simple GUI (some sliders) for those effects. How to know which sliders to create? Some possibilities:

  • Using ISF (Interactive Shader Format). It's basically a GLSL file wrapped in some metadata specifying what kind of GUI is needed: https://github.com/mrRay/ISF_Spec/ Using ISF would have the benefit of making available a few thousand effects at once: https://editor.isf.video/shaders
  • A different approach used by the new FLOSS animation application Enve is described here https://maurycyliebner.github.io/docs/index They decided to keep the shader files untouched, and add a accompanying xml file to describe the required GUI.

Shaders can take uniforms as bool, int, float, vec, mat, but it's probably not necessary to accept all types. At least float should be there.

Something nice to have would be fast iteration. For instance, if there's a textarea where to write GLSL, it would be excellent if it can autocompile on changes, so we can quickly experiment with the shader code until it looks good. If it's file based instead of using a textarea, detecting file changes and reloading them would be really nice.

hamoid avatar Apr 24 '20 08:04 hamoid

I actually planning to redesign the plugin system, not only to support what you want but also to support scripting and other programming languages, the only missing part in the puzzle is what I'll do with UI interfacing, because I don't want plugins to depend on Qml.

hipersayanX avatar Mar 05 '23 17:03 hipersayanX