GLSL Shaders for Plex HTPC do not work

Server Version#:
Player Version#: 1.17.0.3002-f753d4a0

Has anyone got GLSL shaders to work for their Plex HTPC install? This was working fine for me in PMP, but doesn’t seem to work anymore for Plex HTPC.

The glsl shader files were copied to the “%LOCALAPPDATA%\Plex HTPC”, like so:

"C:\Users\mozar\AppData\Local\Plex HTPC\shaders\Anime4K_Clamp_Highlights.glsl"
...
...
<Other glsl files>

My mpv.confg file includes the list of shaders:

glsl-shaders="~~/shaders/Anime4K_Clamp_Highlights.glsl;~~/shaders/Anime4K_Restore_CNN_M.glsl;~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl;~~/shaders/Anime4K_Restore_CNN_S.glsl;~~/shaders/Anime4K_AutoDownscalePre_x2.glsl;~~/shaders/Anime4K_AutoDownscalePre_x4.glsl;~~/shaders/Anime4K_Upscale_CNN_x2_S.glsl"

The Plex HTPC log is successfully reading that config. But doesn’t seem to do anything with it. The video output does not have the shaders included. In the previous PMP logs, not only would there be lines of reading the config, but also of opening the glsl files.

Plex HTPC.log (393.6 KB)

Using ~~ as a placeholder for your user folder doesn’t appear to work reliably on Windows. Try using the complete path C:\Users\<username>\AppData\Local\Plex HTPC\shaders

Changing to a full path doesn’t seem to work either, unfortunately. On a whim I tried both forward slash and backslash, and even copied the shader files to the root C: drive in case the whitespace was doing something.

I am not sure that you can use a list of shaders.

This worked for PMP, I haven’t tried it with Plex for Windows. It’s unfortunate if shaders don’t work in Plex HTPC, but at least for the time being I can continue using PMP.

It didn’t in the past but it does now. If the path were the issue, it would log a not found error in the logs (which it didn’t). Also, the list of shaders does work but if you combine incompatible shaders you’ll get poor results (though that doesn’t seem to be the case here).

Yes, they work quite well. In looking at your logs, I have to ask why this:
May 27, 2022 20:20:56.824 [12340] DEBUG - [MPVEngine/mpv] cplayer: Setting option 'gpu-api' = 'opengl' (flags = 4)
This may be the crux of your problem. Plex HTPC uses the d3d11 gpu-context by default and this gpu-api option is likely disabling a lot of the functionality.

1 Like

Thank you! That was it! There was a bug with an earlier version of the shaders I was using that only worked in open-gl, that has since been fixed, but I forgot to remove the open-gl workaround.

Thank you again! HTPC is a huge improvement over PMP!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.