precision highp? gl_FragCoord?;
I can’t test right now. It may have to be:precision highp? vec2 gl_FragCoord?;
Or:precision highp float;
L. Spiro
precision highp? gl_FragCoord?;
I can’t test right now. It may have to be:precision highp? vec2 gl_FragCoord?;
Or:precision highp float;
Thank you L. Spiro
Kindly help me to fix below compile error,
Fragment shader compile log: ERROR: 0:1: 'gl_FragCoord' : syntax error: syntax error
// MODIFIED FRAGMENT SHADER CODE AS BELOW
precision highp gl_FragCoord;
//precision highp vec4 gl_FragCoord;
void main()
{
....
}
And putting below didn't make any difference to the program
precision highp float;
Please help
It was an issue in the following line.
if(mod(xpos, 2.0) == 0.0)
Seems highp values beyond 2048 mod operation returns values where equals operation fails in the above condition.
I did the following and it seems fine in the iPad pro also
int val = int(mod(gl_FragCoord.x, 2.0));
if(val == 0)
gl_FragColor = // red;
else
gl_FragColor = // green;
Thanks you all