I have the following fragment shader:
precision highp float;
varying highp vec2 vTexCoord;
uniform sampler2D uColorTexture;
void main () {
highp vec4 tmp;
tmp = ((texture2D (uColorTexture, vTexCoord) + texture2D (uColorTexture, vTexCoord)) / 2.0);
gl_FragColor = tmp;
}
I know this shader does not make much sense but it should still run correct and I try to reproduce a problem with it. When I analyze this shader with the Xcode OpenGL-ES analyzer it shows an error:
Overflow in implicit conversion, minimum range for lowp float is (-2,2)
and it not only shows this error, also the rendering output is broken do to overflows. So it's not just a false positive from the analyzer it actually overflows.
Can anyone explain to me why dis produces an overflow although I chose highp everywhere?