opengles how to change black pixels to transplant : my code is 

    vec4 textureColor = texture2D(uTextureSampler, vTextureCoord);
    if(textureColor.r* 0.299 + textureColor.g * 0.587 + textureColor.b * 0.114 < 0.1) {
        gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
    } else {
        gl_FragColor = vec4(textureColor.r, textureColor.g, textureColor.b, textureColor.w);
    }


the problem is how to judge black pixel, my code is not true, how can i do,Forgive me for my poor English

