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

layout(std140) uniform fs_ub
{
    highp vec3 u_hsv;
} _212;

uniform mediump sampler2D u_tex0;
uniform mediump sampler2D u_tex1;

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

highp vec3 transformHSV(highp vec3 inColor, highp vec3 hsv)
{
    highp float h = hsv.x;
    highp float s = hsv.y;
    highp float v = hsv.z;
    highp float vsu = (v * s) * cos((h * 3.1415927410125732421875) / 180.0);
    highp float vsw = (v * s) * sin((h * 3.1415927410125732421875) / 180.0);
    highp vec3 outColor = vec3((((((0.2989999949932098388671875 * v) + (0.7009999752044677734375 * vsu)) + (0.16799999773502349853515625 * vsw)) * inColor.x) + ((((0.58700001239776611328125 * v) - (0.58700001239776611328125 * vsu)) + (0.3300000131130218505859375 * vsw)) * inColor.y)) + ((((0.114000000059604644775390625 * v) - (0.114000000059604644775390625 * vsu)) - (0.4970000088214874267578125 * vsw)) * inColor.z), (((((0.2989999949932098388671875 * v) - (0.2989999949932098388671875 * vsu)) - (0.328000009059906005859375 * vsw)) * inColor.x) + ((((0.58700001239776611328125 * v) + (0.41299998760223388671875 * vsu)) + (0.0350000001490116119384765625 * vsw)) * inColor.y)) + ((((0.114000000059604644775390625 * v) - (0.114000000059604644775390625 * vsu)) + (0.291999995708465576171875 * vsw)) * inColor.z), (((((0.2989999949932098388671875 * v) - (0.300000011920928955078125 * vsu)) + (1.25 * vsw)) * inColor.x) + ((((0.58700001239776611328125 * v) - (0.587999999523162841796875 * vsu)) - (1.0499999523162841796875 * vsw)) * inColor.y)) + ((((0.114000000059604644775390625 * v) + (0.885999977588653564453125 * vsu)) - (0.20299999415874481201171875 * vsw)) * inColor.z));
    return outColor;
}

void main()
{
    highp vec4 texColor = vec4(texture(u_tex0, v_texCoord).xyz, texture(u_tex1, v_texCoord).x);
    highp float _200 = texColor.w;
    highp vec4 _201 = texColor;
    highp vec3 _203 = _201.xyz * _200;
    texColor.x = _203.x;
    texColor.y = _203.y;
    texColor.z = _203.z;
    highp vec3 param = texColor.xyz;
    highp vec3 param_1 = _212.u_hsv;
    highp vec3 _222 = transformHSV(param, param_1);
    texColor.x = _222.x;
    texColor.y = _222.y;
    texColor.z = _222.z;
    FragColor = texColor * v_color;
}

