- Peter Butterworth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// $MinimumShaderProfile: ps_4_0 | |
#define CAS 0.35 | |
#define Npixels 1280 //0 | |
#define Show_Edge 0 | |
/* --- CAS_lite (dx11) --- */ | |
/* Contrast Adaptive Sharpening (AMD FidelityFX CAS) | |
mpc-hc mod by butterw (9 texture, 47 arithmetic) (2023-11) | |
based on this reshade port: https://gist.github.com/martymcmodding/30304c4bffa6e2bd2eb59ff8bb09d135 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// compensated Lanczos3, pass X | |
// originally from mpc-be: https://sourceforge.net/p/mpcbe/code/HEAD/tree/trunk/src/Shaders/Resizers/resizer_lanczos3_x.hlsl | |
// adapted for use in mpc-hc (as zoomX=2) by butterw (license: GPL v3) | |
// use as a pre-resize shader, input resolution should match the screen resolution (no player resize involved) | |
// pass X perf: (6 texture, 79 arithmetic) | |
// A catmull-rom resizer (true separable kernel) is also available: resizer_catmull4_x.hlsl. Catmull-Rom spline4, pass X: (4 texture, 22 arithmetic) | |
sampler s0: register(s0); | |
float2 p0: register(c0); // W, H | |
float2 p1: register(c1); //px, py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define Show_Edge 20 | |
//[0, 1, 2, 20] default 0: edge sharpen, 1: show edges in Red, 2: show luma edges, 20 luma edges on dark background | |
#define Show_SplitScreen 1 //[0, 1, 2] default 0: no splitscreen, 1: horizontal split, 2 vertical split | |
/* | |
Edge detection and Edge sharpening, using Four 3x3 Prewitt operators. | |
Software Licence: GPL v3 | |
the original Edge Sharpen is distributed with MPC-HC: https://www.videohelp.com/software/Media-Player-Classic-Home-Cinema | |
2020: - modification and optimization by butterw (9 texture, 47 arithmetic) >> (9 texture, 34 arithmetic) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//!HOOK LUMA | |
//!BIND HOOKED | |
//!DESC Frei-Chen Edge Detection | |
/* | |
Frei-Chen Edge Detection (in Luma) | |
original source code (freichen.frag): http://rastergrid.com/blog/2011/01/frei-chen-edge-detector/ | |
glsl-shader adapted to mpv .hook by butterw | |
best results as a LUMA hook but can also work on MAIN or OUTPUT, can be combined with NoChroma.hook. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//!HOOK CHROMA | |
//!BIND HOOKED | |
//!DESC ChromaOff | |
/* glsl-shader for mpv video player, removes yuv source chroma (keep luma)*/ | |
vec4 hook(){ | |
return vec4(0.5); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Moved to FilmGrain/Noise shader dir: https://github.com/butterw/bShaders/tree/master/FilmGrain_Noise |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
updated version in https://github.com/butterw/bShaders |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
bTimeEffect_DePixelate (square pixels) | |
by butterw | |
control a video pixel shader effect vs time. | |
tested in mpc-hc v1.9.3: | |
- Opening the player by double clicking a video starts the clock | |
- Short effect/glitch repeats every 10 seconds by default (T). | |
- Note that Loading another video or Pause/Stop does not reset the clock ! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sampler s0: register(s0); | |
float4 p1: register(c1); | |
#define px p1.x //: one_over_width: 1/W | |
#define py p1.y //: one_over_height: 1/H | |
/* bSide.hlsl by butterw v1.0 (ZoneShader_mpc) | |
- this directX pixel shader shows how to apply effects to an xy-zone of the video (half the screen, or a box) | |
applications: | |
- half the screen: Side by side effect comparisons. |