bjin / mpv-prescalers

prescalers for mpv, as user shaders
GNU Lesser General Public License v3.0
355 stars 34 forks source link

RAVU 3x #52

Closed george-emerald closed 1 year ago

george-emerald commented 1 year ago

Is it possible to generate a RAVU shader that triples the image without compute? I have an Apple Silicon Macbook which doesn't support OpenGL or Vulkan so the compute branch just displays a blue image.

george-emerald commented 1 year ago

If anyone knows how to install OpenGL 4.3 or later on Mac OS it would also fix this.

bjin commented 1 year ago

Is it possible to generate a RAVU shader that triples the image without compute?

It's not possible. It's due to how fragment and compute shaders works, and can't be bypassed. Ravu-lite is 4x upscaling, and the fragment shader stores 4 pixels into 4 channels of rendered texture, the same can't be used by ravu-3x (9 pixels can't be stored in single texture).

If anyone knows how to install OpenGL 4.3 or later on Mac OS it would also fix this.

AFAIK Apple abandoned OpenGL. There is also MoltenVK but I don't know how it works nowadays.

Argon- commented 1 year ago

If anyone knows how to install OpenGL 4.3 or later on Mac OS it would also fix this.

There's no way to accomplish this. Apple doesn't allow drivers from GPU vendors and they themselves only provide 4.1. This is the case for... a decade? And this will not change. Also, Apple will not add Vulkan support to macOS. Ideally, what macOS users need is a Metal port. This is not gonna happen with 99% of open source projects due to a huge amount of effort for a dramatically small user group. Also, developers would need access to Macs to develop that. The middle way is the already mentioned MoltenVK. It allows Vulkan enabled programs to run on Macs through Metal. However, this still requires major effort from developers to integrate (although probably less than an actual Metal backend). Moreover, MoltenVK doesn't support all of Vulkan, so there would still be problems.

tl;dr: Modern OpenGL on macOS -> no Vulkan on macOS -> no Metal on macOS -> yes Metal support in open source software -> exceedingly rare

That's the sad state of affairs of graphics on macOS for many, many years now and there is no indication that it may change in the future.