summaryrefslogtreecommitdiffstats
path: root/video/out/gl_video_shaders.glsl
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-18 22:24:45 +0100
committerwm4 <wm4@nowhere>2014-12-18 22:24:45 +0100
commit1b766ab208d23d272b2f57b4ea02c892dc1dd029 (patch)
treed6563d2fe8c9ad1532152e334b9db508b608d468 /video/out/gl_video_shaders.glsl
parent32fb3dae8783800e01e94b561baca306389d64a8 (diff)
downloadmpv-1b766ab208d23d272b2f57b4ea02c892dc1dd029.tar.bz2
mpv-1b766ab208d23d272b2f57b4ea02c892dc1dd029.tar.xz
vo_opengl: do not use 4x3 matrix
This was a nice trick to get the mpv colormatrix directly into OpenGL, because the memory representation happened to match. Unfortunately, OpenGL ES 2 doesn't have glUniformMatrix4x3fv(). Even more unfortunately, the memory representation is now incompatible. It would be nice to change it, but that would mean getting into a big mess.
Diffstat (limited to 'video/out/gl_video_shaders.glsl')
-rw-r--r--video/out/gl_video_shaders.glsl5
1 files changed, 3 insertions, 2 deletions
diff --git a/video/out/gl_video_shaders.glsl b/video/out/gl_video_shaders.glsl
index 322c91fd13..547d5cd621 100644
--- a/video/out/gl_video_shaders.glsl
+++ b/video/out/gl_video_shaders.glsl
@@ -168,7 +168,8 @@ uniform sampler2D lut_c;
uniform sampler2D lut_l;
uniform sampler3D lut_3d;
uniform sampler2D dither;
-uniform mat4x3 colormatrix;
+uniform mat3 colormatrix;
+uniform vec3 colormatrix_c;
uniform mat3 cms_matrix;
uniform mat2 dither_trafo;
uniform vec3 inv_gamma;
@@ -366,7 +367,7 @@ void main() {
#endif
#ifdef USE_COLORMATRIX
// Conversion from Y'CbCr or other spaces to RGB
- color = mat3(colormatrix) * color + colormatrix[3];
+ color = mat3(colormatrix) * color + colormatrix_c;
#endif
#ifdef USE_CONV_GAMMA
// Post-colormatrix converted gamma correction (eg. for MP_IMGFLAG_XYZ)