diff options
author | Niklas Haas <git@nand.wakku.to> | 2015-02-23 22:41:13 +0100 |
---|---|---|
committer | Niklas Haas <git@nand.wakku.to> | 2015-02-24 00:29:24 +0100 |
commit | 71a20f7c981ed66e1ba2e4c90c258c7506a9fb6b (patch) | |
tree | 053c30c962cd983df1de2436dbc83622efa3fd64 /video/out/gl_video_shaders.glsl | |
parent | c52833bf16c9f4cc2bb676d13df86ef6be30f434 (diff) | |
download | mpv-71a20f7c981ed66e1ba2e4c90c258c7506a9fb6b.tar.bz2 mpv-71a20f7c981ed66e1ba2e4c90c258c7506a9fb6b.tar.xz |
vo_opengl: explicitly check potential candidates for polar filters
This adds a small check for candidates that could potentially be inside
the radius, but aren't necessarily. This speeds up performance by a
negligible amount on my hardware, but it's mainly a prerequisite for a
further change (using a larger true radius).
Diffstat (limited to 'video/out/gl_video_shaders.glsl')
-rw-r--r-- | video/out/gl_video_shaders.glsl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/video/out/gl_video_shaders.glsl b/video/out/gl_video_shaders.glsl index f8aef48b9b..b95953bfa6 100644 --- a/video/out/gl_video_shaders.glsl +++ b/video/out/gl_video_shaders.glsl @@ -312,6 +312,11 @@ float[6] weights6(sampler2D lookup, float f) { lo = min(lo, c); \ hi = max(hi, c); +#define SAMPLE_POLAR_POTENTIAL(LUT, R, X, Y) \ + if (length(vec2(X, Y) - fcoord)/R < 1.0) { \ + SAMPLE_POLAR_HELPER(LUT, R, X, Y) \ + } + #define SAMPLE_CONVOLUTION_POLAR_R(NAME, R, LUT, WEIGHTS_FN, ANTIRING) \ vec4 NAME(VIDEO_SAMPLER tex, vec2 texsize, vec2 texcoord) { \ vec2 pt = vec2(1.0) / texsize; \ |