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

uniform highp sampler2D SpriteTextureSampler;

in highp vec4 v_Color;
in highp vec2 v_TextureCoordinate;
layout(location = 0) out highp vec4 entryPointParam_psMain;

void main()
{
    highp vec4 sampled = texture(SpriteTextureSampler, v_TextureCoordinate);
    highp vec4 _36 = sampled * v_Color.w;
    highp vec4 result;
    if (v_Color.z != 0.0)
    {
        highp float _179;
        highp float _184 = modf(v_Color.x * 7.96875, _179);
        highp float _192;
        highp float _197 = modf(v_Color.y * 7.96875, _192);
        highp float _74 = v_Color.z * 255.0;
        highp float _75 = _74 - 64.0 * trunc(_74 / 64.0);
        highp vec2 stepSize = vec2(1.0 / ((_184 * 32.0) * exp2(_179)), 1.0 / ((_197 * 32.0) * exp2(_192))) * ((_75 * 0.046875) + 1.0);
        highp float alpha = sampled.w;
        highp float _83 = stepSize.x;
        highp float _91 = -_83;
        highp float _99 = stepSize.y;
        highp float _107 = -_99;
        if ((((((((((alpha + textureLod(SpriteTextureSampler, v_TextureCoordinate + vec2(_83, 0.0), 0.0).w) + textureLod(SpriteTextureSampler, v_TextureCoordinate + vec2(_91, 0.0), 0.0).w) + textureLod(SpriteTextureSampler, v_TextureCoordinate + vec2(0.0, _99), 0.0).w) + textureLod(SpriteTextureSampler, v_TextureCoordinate + vec2(0.0, _107), 0.0).w) + textureLod(SpriteTextureSampler, v_TextureCoordinate + vec2(_91, _107), 0.0).w) + textureLod(SpriteTextureSampler, v_TextureCoordinate + vec2(_83, _107), 0.0).w) + textureLod(SpriteTextureSampler, v_TextureCoordinate + vec2(_91, _99), 0.0).w) + textureLod(SpriteTextureSampler, v_TextureCoordinate + stepSize, 0.0).w) * 0.111111111938953399658203125) > 0.0)
        {
            if (alpha < 0.5)
            {
                if (v_Color.z > 0.4980392158031463623046875)
                {
                    result = vec4(1.0, 0.0, 0.0, 1.0);
                }
                else
                {
                    result = vec4(0.4510000050067901611328125, 0.859000027179718017578125, 1.0, 1.0);
                }
            }
            else
            {
                result = _36 * (1.0 + (_75 * 0.00234374962747097015380859375));
            }
        }
        else
        {
            result = _36;
        }
    }
    else
    {
        result = _36;
    }
    entryPointParam_psMain = result;
}

#endif
