obs-shaderfilter icon indicating copy to clipboard operation
obs-shaderfilter copied to clipboard

Effects Not Loading on OBS 32.0.1 using Metal (macOS)

Open LooneyH opened this issue 6 months ago • 4 comments

I have a lot of filters applied to have some dynamic animations on my stream and different sources, but when using the Metal renderer they all currently fail. They currently load fine using any older versions than OBS 32 and also when using OpenGL (which is still the default for now on macOS), but I imagine down the line the intention is to default to Metal on macOS so it would be a huge help if this is something that could be worked on.

The log file can be found here https://obsproject.com/logs/MGvkIAxiMXDM8k7I

LooneyH avatar Oct 07 '25 08:10 LooneyH

As far as I understand it at the moment this needs to be fixed in the metal part that is added to OBS.

exeldro avatar Oct 07 '25 09:10 exeldro

Okay cool I wasn't sure if it was something you could work on or part of the experimental nature of OBS' implementation. I'll post an issue on their github now and hopefully it'll be something they can use to fix it on a wider scale

LooneyH avatar Oct 07 '25 09:10 LooneyH

https://github.com/obsproject/obs-studio/issues/12705#issuecomment-3382353794 just coming back now to say that it seems according to OBS that it is because of the stricter requirements of Metal, so seems that their implementation won't make a major difference any time soon.

LooneyH avatar Oct 10 '25 16:10 LooneyH

Just following on from this, I thought I'd have a brief look and found a few different tools that allow translating from GLSL to MetalSL, hopefully these can help to create at least an experimental version of the shaders for people using Metal and then bugs can always be reported down the line. I'll link some of the tools I've found below:

  • https://github.com/alaingalvan/CrossShader
  • https://github.com/schwa/ShaderConverter
  • https://github.com/polymonster/pmfx-shader

Hopefully this helps, though I do agree it'd seem better long-term for the OBS team to work on the Metal renderer being able to translate shaders as required to reduce friction for developers

(I will add that they also mention letting them know if you have ideas of what could be causing the problem so "the transpiler can be enhanced to support the specific shader code variation", you may have already done so but thought I'd make sure that was something you were aware of as an option)

LooneyH avatar Nov 02 '25 13:11 LooneyH

I don't really know much about shaders, so I'm trying to understand the origin of this issue.

Correct me if I'm wrong, but from what I understand, GLSL shaders can be fully translated to MSL shaders, and OBS is planning to eventually have full support for this, but at the moment it only supports the translation to the extent that only all the built-in stuff works.

Does that mean you can still use this plugin on Metal as-is, as long as you write MSL shaders for it? Or does it utilize e.g. shims that also need to be modified?

Would love to be able to use Metal since it's actually significantly faster on my Macbook Air M1.

msikma avatar Jan 10 '26 10:01 msikma

Some shaders might work. As far as I understand it shaders without any functions using global variables. The shaders would still need to be writen in the OBS variant of High-Level Shader Language (HLSL).

exeldro avatar Jan 10 '26 11:01 exeldro