diff options
author | Niklas Haas <git@nand.wakku.to> | 2015-01-17 17:28:47 +0100 |
---|---|---|
committer | Niklas Haas <git@nand.wakku.to> | 2015-01-22 19:29:23 +0100 |
commit | f5e48f023524630d0334b1fbc2f2dc44bbc2819b (patch) | |
tree | f282841538e9ba421152c7a5b3750bbb730ebf4b /video/out/gl_video_shaders.glsl | |
parent | 571fe8f729827c628a2fa25c0b7b468a1a4559ae (diff) | |
download | mpv-f5e48f023524630d0334b1fbc2f2dc44bbc2819b.tar.bz2 mpv-f5e48f023524630d0334b1fbc2f2dc44bbc2819b.tar.xz |
vo_opengl: clean up ewa_lanczos code
This fixes compatibility with GLES 2.0 and makes the code a bit neater
in general. It also properly forces indirect scaling for subsampled
video regardless of the lscale setting.
Diffstat (limited to 'video/out/gl_video_shaders.glsl')
-rw-r--r-- | video/out/gl_video_shaders.glsl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/video/out/gl_video_shaders.glsl b/video/out/gl_video_shaders.glsl index 51c444aa2e..1a489835cc 100644 --- a/video/out/gl_video_shaders.glsl +++ b/video/out/gl_video_shaders.glsl @@ -163,8 +163,12 @@ uniform VIDEO_SAMPLER texture3; uniform vec2 textures_size[4]; uniform vec2 chroma_center_offset; uniform vec2 chroma_div; -uniform sampler2D lut_c; -uniform sampler2D lut_l; +uniform sampler2D lut_2d_c; +uniform sampler2D lut_2d_l; +#if HAVE_1DTEX +uniform sampler1D lut_1d_c; +uniform sampler1D lut_1d_l; +#endif #if HAVE_3DTEX uniform sampler3D lut_3d; #endif @@ -304,8 +308,7 @@ float[6] weights6(sampler2D lookup, float f) { float wsum = 0; \ for (int y = 1-R; y <= R; y++) { \ for (int x = 1-R; x <= R; x++) { \ - vec2 d = vec2(x,y) - fcoord; \ - float w = texture(LUT, vec2(0.5, length(d) / R)).r; \ + float w = texture1D(LUT, length(vec2(x,y) - fcoord)/R).r; \ wsum += w; \ res += w * texture(tex, base + pt * vec2(x, y)); \ } \ |