On desktop, the image quality is identical to original shadertoy example.
I also used the same shader with Apple SpriteKit on iphone (in OpenGL mode) and get the good result identical to shadertoy.
Does author of that tutorial tried to run it on mobile? What was the result he get?
How to get good quality on mobile?
Yes. Adding precision highp float; to the shader source completely solve the issue on mobile. But, on desktop build there is now error: WARNING:GRAPHICS: ERROR: 0:<line_number>: 'precision' : syntax error: syntax error
and example don’t build.
This is strange.
For now, the only way to make this example to work as expected on mobile AND desktop is explicitly qualify precision on every variable and constant.
Edit:
Or we can add #ifdef GL_ES precision highp float; #endif
and remove precision qualifiers from var_texcoord0 and time and all will be ok.