/usr/share/lightspark/lightspark.frag is in lightspark-common 0.7.2+git20150512-2build4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #ifdef GL_ES
precision highp float;
#endif
uniform sampler2D g_tex1, g_tex2;
uniform float yuv;
uniform float alpha;
uniform float direct;
varying vec4 ls_TexCoords[2];
varying vec4 ls_FrontColor;
const mat3 YUVtoRGB = mat3(1, 1, 1, //First coloumn
0, -0.344, 1.772, //Second coloumn
1.402, -0.714, 0); //Third coloumn
void main()
{
//Tranform the value from YUV to RGB
vec4 vbase = texture2D(g_tex1,ls_TexCoords[0].xy);
#ifdef GL_ES
vbase.rgb = vbase.bgr;
#endif
vbase *= alpha;
vec4 val = vbase.bgra-vec4(0,0.5,0.5,0);
val.rgb = YUVtoRGB*(val.rgb);
//Select the right value
if (direct == 1.0) {
gl_FragColor = ls_FrontColor;
} else {
gl_FragColor=(vbase*(1.0-yuv))+(val*yuv);
}
}
|