Try:
varying highp vec2 textureCoordinate;
uniform sampler2D inputImageTexture;
uniform lowp float brightness;
uniform lowp float contrast;
void main()
{
lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate);
textureColor.rgb = ((textureColor.rgb - vec3(0.5)) * contrast + vec3(0.5));
gl_FragColor = vec4((textureColor.rgb + vec3(brightness)), textureColor.w);
}
EDIT: The reason why your shader was not working, is because you were doubling the input too. If you think of it, the first shaders apply ONE effect to ONE image. When merging both, you'd expect TWO effects on ONE image. But what you tried to do was applying TWO effects on TWO images. You just had to get rid of the second texture and UV parameters, then apply both effects on the single texture remaining.