3c2592d0deb7e4e1e5dc530d89bf0673586ef247
[framework/uifw/evas.git] / src / modules / engines / gl_common / shader / yuv_nomul_frag.shd
1 #ifdef GL_ES
2 precision mediump float;
3 #endif
4 uniform sampler2D tex, texu, texv;
5 varying vec2 tex_c, tex_c2, tex_c3;
6 void main()
7 {
8    const mat4 yuv2rgb = mat4( 1.16400,  1.16400,  1.16400, 0.00000,
9                               0.00000, -0.34410,  1.77200, 0.00000,
10                               1.40200, -0.71410,  0.00000, 0.00000,
11                              -0.77380,  0.45630, -0.95880, 1.00000);
12    gl_FragColor = yuv2rgb * vec4(texture2D(tex, tex_c.xy).r,
13                                  texture2D(texu, tex_c2.xy).r,
14                                  texture2D(texv, tex_c3.xy).r, 1.0);
15 }