
different configuration sections can be triggered based on input compute shaders (code runs by thread in workgroup blocs with shared memory). pre-scalers (custom high-quality resizers) source shaders (ex: LUMA shader working on yuv420 from video decoder) multipass shaders (can use output textures of previous passes) selective pass execution (HOOK point, WHEN condition) Mpv shaders have less limitations than user shaders in mpc-hc/be: Parameters: ScreenColor, Time of first run (Tfirst), Duration (Td), Repetition period (Tcycle), End (Number of runs, End time or No End).Īn example with SBS (side-by-side) 3D input: įloat4 main(float2 tex: TEXCOORD0): COLOR // uniform program parameters, updated every frame: "random" PRNG, "frame" is an integer frame counter. bStrobe (repeating Effect with configurable timings) v1.0 The borders are image zones, which means you can apply any effect on them (not just colored borders). You can offset the window to compensate for a non-centered video.

OffsetPillarbox: view video as a vertical aspect ratio on a standard landscape monitor with borders on the side (ex: 9/16, 1/1, etc.). Simulate a 21/9 display on a standard monitor. RatioLetterbox: View a custom Aspect Ratio. MaskCrop: custom mask (Top, Bottom, Left, Right) the sides of the screen and recenter image, you could use this to mask a logo at the bottom of the screen for instance (mpc-hc doesn't have a built-in crop feature). No programming required: select mode and adjust parameters in #define barMask (Custom Mask, Aspect Ratio Mask, + Shift) v1.2: Once set, shaders stay active until you disable them, so creating an empty "Disable" Shader Profile is useful. With Mpc-hc, you can save Shader Presets (a pre/post resize Shader chain), that you can access directly by Right Click>Shaders. You can create multiple versions of the same shader based on your prefered parameter values/use cases and switch between them as required. For this, it's best to use a text editor with C syntaxic coloring option like Notepad++. Modifying the source file is necessary to change parameter values (auto-compilation triggers automatically after saving). In Mpc-hc, you need to install them in the Shaders subfolder (you need write permission on the source folder to be able to modify them).

They are tested in mpc-hc on intel gpu (integrated graphics) and should be easy to use and modify. I'm sharing some directX pixel shader (.hlsl) control code I've written recently:
