efl/src/modules/evas/engines/gl_common/shader/yuv_nomul_frag.h

24 lines
623 B
C

"#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"