#version 300 es
precision mediump float;
precision highp int;

layout(std140) uniform fs_ub
{
    highp mat4 colorTransform;
} _94;

uniform mediump sampler2D u_tex0;
uniform mediump sampler2D u_tex1;
uniform mediump sampler2D u_tex2;

in highp vec2 v_texCoord;
layout(location = 0) out highp vec4 FragColor;
in highp vec4 v_color;

highp vec3 trasnformYUV(inout highp vec3 YUV, highp mat4 colorTransform)
{
    YUV -= vec3(colorTransform[0].w, colorTransform[1].w, colorTransform[2].w);
    return mat3(vec3(colorTransform[0].xyz), vec3(colorTransform[1].xyz), vec3(colorTransform[2].xyz)) * YUV;
}

void main()
{
    highp vec3 YUV;
    YUV.x = texture(u_tex0, v_texCoord).x;
    YUV.y = texture(u_tex1, v_texCoord).x;
    YUV.z = texture(u_tex2, v_texCoord).x;
    highp vec3 param = YUV;
    highp mat4 param_1 = _94.colorTransform;
    highp vec3 _101 = trasnformYUV(param, param_1);
    highp vec4 OutColor;
    OutColor.x = _101.x;
    OutColor.y = _101.y;
    OutColor.z = _101.z;
    OutColor.w = 1.0;
    FragColor = v_color * OutColor;
}

