Log in

View Full Version : Convert .glsl to .hlsl


cns00
14th February 2024, 14:19
I am using PotPlayer which uses directx9 .hlsl shaders. Unfortunately, it doesn't recognize .glsl shaders.

I found fsr.glsl and the link is https://gist.github.com/agyild/82219c545228d70c5604f865ce0b0ce5. I want to use it in PotPlayer.

Can someone who is good at coding convert the file .hlsl so I can use it in PotPlayer?

huhn
14th February 2024, 15:49
can a shader even be used to upscale in potplayer.

did you ever look at it it's really not doing good i mean at all.

SirMaster
14th February 2024, 18:44
Have you tried asking ChatGPT?

huhn
14th February 2024, 18:55
https://github.com/Blinue/Magpie/blob/e2e01453d208b2badb187853366cdc3f162bf382/src/Effects/FSR/FSR_EASU.hlsl#L4

i highly doubt that will work.

just alone the hooks and i doubt shaders in potplayer can actual change the resolution. i know it is not possible in mpc-hc.

butterw2
19th February 2024, 16:18
user shaders can't do frame scaling in mpc, it would need to be a built-in shader https://github.com/Aleksoid1978/VideoRenderer/issues/114.

The use case for FSR1 is a sharp upscaler for general purpose video (up to 2.0x ratio) that runs well on integrated graphics (requires just slightly more gpu resources than lanczos3 in mpv).

cns00
3rd March 2024, 22:13
user shaders can't do frame scaling in mpc, it would need to be a built-in shader https://github.com/Aleksoid1978/VideoRenderer/issues/114.

The use case for FSR1 is a sharp upscaler for general purpose video (up to 2.0x ratio) that runs well on integrated graphics (requires just slightly more gpu resources than lanczos3 in mpv).

I don't understand. Is what I want possible or no?

huhn
3rd March 2024, 22:30
in mpv yes in other player unlikely.

here is FSR for mpv: https://gist.github.com/agyild/82219c545228d70c5604f865ce0b0ce5