aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag.h
blob: 0df4b9793da049c6abcb80ed349de893fd1ecbe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"#ifdef GL_ES\n"
"#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
"precision highp float;\n"
"#else\n"
"precision mediump float;\n"
"#endif\n"
"#endif\n"
"uniform sampler2D tex, texu, texv;\n"
"varying vec2 tex_c, tex_c2, tex_c3;\n"
"void main()\n"
"{\n"
"   float r, g, b, y, u, v;\n"
"   y = texture2D(tex, tex_c.xy).r;\n"
"   u = texture2D(texu, tex_c2.xy).r;\n"
"   v = texture2D(texv, tex_c3.xy).r;\n"
"   y = (y - 0.0625) * 1.164;\n"
"   u = u - 0.5;\n"
"   v = v - 0.5;\n"
"   r = y + (1.402   * v);\n"
"   g = y - (0.34414 * u) - (0.71414 * v);\n"
"   b = y + (1.772   * u);\n"
"   gl_FragColor = vec4(r, g, b, 1.0);\n"
"}\n"