bloc97 / Anime4K

A High-Quality Real Time Upscaler for Anime Video
https://bloc97.github.io/Anime4K/
MIT License
18.51k stars 1.35k forks source link

How do I convert glsl to hlsl? #239

Open RyJeRT opened 6 months ago

RyJeRT commented 6 months ago

I would like to convert glsl shaders to hlsl for the magpie program

Tama47 commented 5 months ago

Doesn't Magpie already have Anime4K shaders?

RyJeRT commented 5 months ago

not all of them

Blinue commented 5 months ago

Porting an mpv hook to a Magpie effect is challenging. Currently, the Anime4K shaders available in Magpie were manually ported, making it difficult to handle especially large shaders like UL and UUL. I see two potential solutions:

  1. Write a script to export the weights as a Magpie effect, similar to how they are exported as an mpv hook in this repository.
  2. Export the weights as ONNX. Magpie has a special version that supports this format.