This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[Feature] Multiple passes for glsl shaders
#4
Just, tested it:
# Imports
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Loading Plugins
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/libvs_placebo.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/FFMS2/ffms2.dll")
# source: 'G:\TestClips&Co\files\test.avi'
# current color space: YUV420P8, bit depth: 8, resolution: 640x352, fps: 25, color matrix: 470bg, yuv luminance scale: limited, scanorder: progressive
# Loading source using FFMS2
clip = core.ffms2.Source(source="G:/TestClips&Co/files/test.avi",cachefile="E:/Temp/avi_6c441f37d9750b62d59f16ecdbd59393_853323747.ffindex",format=vs.YUV420P8,alpha=False)
# making sure input color matrix is set as 470bg
clip = core.resize.Bicubic(clip, matrix_in_s="470bg",range_s="limited")
# making sure frame rate is set to 25
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# GLSL filter: ACNet.glsl
# adjusting color space from YUV420P8 to YUV444P16 for VsGLSLFilter
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, range_s="limited")
clip = core.placebo.Shader(clip=clip, shader="I:/Hybrid/64bit/vsfilters/GLSL/ACNet.glsl", width=640, height=352)
# GLSL filter: adaptive-sharpen.glsl
clip = core.placebo.Shader(clip=clip, shader="I:/Hybrid/64bit/vsfilters/GLSL/adaptive-sharpen.glsl", width=640, height=352)
# adjusting output color from: YUV444P16 to YUV420P8 for x264Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, range_s="limited")
# set output frame rate to 25.000fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Output
clip.set_output()
-> had no problem here using multiple GLSL filters,....
You need to use "Filter Queue" instead of the default "Filter Order" to add multiple instances,...
read: [INFO] About Vapoursynth Filter Order/Queue
Hybrid allows to add:
  • (most) filters multiple times
  • (most) filters only on frame sections
I'm also working on allowing to apply (most) filters only on parts of the image, but so far I only had time to add this for 'Levels'. (I mainly have to adjust the GUI to support this, the background code is already implemented, but I haven't found the time to add this). Also this is more of a 'gimmicky' feature for me as nobody required it and I sometimes use something likt that to see how different denoisers act on a source by dividing the source in X sections and filter each section with a different denoiser.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply


Messages In This Thread
RE: [Feature] Multiple passes for glsl shaders - by Selur - 25.12.2021, 19:26

Forum Jump:


Users browsing this thread: 1 Guest(s)