Skip to content

Instantly share code, notes, and snippets.

@bjin
Last active April 21, 2024 01:55
Show Gist options
  • Save bjin/15f307e7a1bdb55842bbb663ee1950ed to your computer and use it in GitHub Desktop.
Save bjin/15f307e7a1bdb55842bbb663ee1950ed to your computer and use it in GitHub Desktop.
simple 0.5x prescaler for mpv, best combined with "--cscale=bilinear --scaler-resizes-only --window-scale=0.5"
//!DESC acme-0.5x
//!HOOK LUMA
//!BIND HOOKED
//!WIDTH HOOKED.w 2 /
//!HEIGHT HOOKED.h 2 /
//!WHEN HOOKED.w 2 % ! HOOKED.h 2 % ! *
//!OFFSET 0.25 0.25
vec4 hook() {
return HOOKED_texOff(vec2(-0.25,-0.25));
}
@Lorograch1
Copy link

Please could you expand on this "--cscale=bilinear --scaler-resizes-only --window-scale=0.5"

Should I add this directly to mpv.conf as provided below? I have placed the hook file in AppData/Roaming/mpv/shaders.

cscale=bilinear
scaler-resizes-only
window-scale=0.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment