[vlc-devel] [PATCH 1/2] vout: vulkan: add support for custom user shaders

Niklas Haas vlc at haasn.xyz
Sat Jun 20 13:08:59 CEST 2020


On Sat, 20 Jun 2020 12:52:04 +0200, Alexandre Janniaux <ajanni at videolabs.io> wrote:
> Hi,
> 
> I find it very interesting that we get custom shaders in
> the libplacebo pipeline, but also quite annoying that the
> user must supply the shader directly to the video output.

I don't really know enough about the VLC architecture to know how
difficult it would be to move these options elsewhere and forward their
contents to the vout, and I'm also slightly worried about the fact that
there's currently no other vout that supports these shaders.

> Using GLSL file directly doesn't seem to be a good UX for
> most users, that will only want to have a list of filters
> and enable them if required. The GLSL textbox is not a
> good idea in my opinion.

The second patch in this set adds a list of 'built-in shaders' that
users can enable without having to manually specify any GLSL file. But
point taken about the textbox.

Using GLSL files directly is the UX that mpv users will be familiar
with, and it's the existence of mpv user shaders that motivates the need
to have GLSL file support.

See e.g. https://github.com/mpv-player/mpv/wiki/User-Scripts#user-shaders

> It would make sense to have a dedicated «custom» filter
> that expose this functionality though.
> 
> Is it planned to move to such case instead of just exposing
> it directly in the video output module?

It's planned to add *some* form of more convenient/basic user interface.
j-b suggested a slider with "performance" on one end and "quality" on
the other... :D

Anyway, my personal issue with that approach is that it's not clear to
me how it's communicated to the user that those settings/filters only
work when using the vulkan/libplacebo vout, since currently nothing else
will implement them.

It's something I feel we could maybe re-examine if we add support for
libplacebo shaders to the opengl pipeline.


More information about the vlc-devel mailing list