Hybrid uses GLS resizing by using vs-placebo (
https://github.com/Lypheo/vs-placebo) which has the following option in regard to using shaders:
Code:
placebo.Shader(clip clip, [string shader, int width, int height, int chroma_loc = 1, int matrix = 2, int trc = 1, string filter = "ewa_lanczos", float radius, float clamp, float taper, float blur, float param1, float param2, float antiring = 0.0, int lut_entries = 64, float cutoff = 0.001, bool sigmoidize = 1, bool linearize = 1, float sigmoid_center = 0.75, float sigmoid_slope = 6.5, string shader_s])
see:
https://github.com/Lypheo/vs-placebo#pla...g-shader_s
The main part used during the resizing is:
Code:
# adjusting color space from YUV420P8 to YUV444P16 for VsGLSLResizer
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, range_s="limited")
# applying the shader
clip = core.placebo.Shader(clip=clip, shader="I:/Hybrid/64bit/vsfilters/ResizeFilter/GLSL/FSRCNNX_x2_8-0-4-1.glsl", width=1280, height=704)
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/libvs_placebo.dll")
In theory vs-placebo can probably be used to use other .glsl shaders in
mpv syntax. I only tested a bunch of other shaders from Anime4k:
https://github.com/bloc97/Anime4K/tree/master/glsl
But I have no clue what other shaders are out there an whether they could even be used using vs-placebo.
-> Without any details on what shader you want o apply to do what I can't really guess what you would need to write down in a custom section aside from:
Code:
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/libvs_placebo.dll") # only needed if the library isn't already loaded
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, range_s="limited") # this would need to be adjusted or left out to produce YUV44P16 from the current color space your script has at the point where the custom code gets applied.
# applying the shader
clip = core.placebo.Shader(clip=clip, shader=" PATH TO THE .glsl file", <whatever setting you placebo can/must send to your filter>)
Cu Selur