Hi
I have a simple shader that works in the shader playground, Android, WIndows and Mac but not iOS.
The error is
An error occurred in the fragment kernel Qualification of arguments in redeclared function 'FragmentKernel' differs from previous declaration ERROR: One or more attached shaders not successfully compiled
The shader is
highp vec2 getWaveSource(int ws) { highp vec2 outp; if (ws == 0) { outp = vec2(-100,-100); } else if (ws == 1) { outp = vec2(-100,500); } else { outp = vec2(400,-500); } return outp; } highp float distanceSq(highp vec2 a, highp vec2 b) { highp vec2 diff = a - b; return dot(diff, diff); } highp vec4 FragmentKernel( highp vec2 uv) { const int wsCount = 3; highp float wavePower = 0.0; for(int i=0; i\<wsCount; i++) { highp vec2 src = getWaveSource(i); highp float dist = distanceSq(src, uv) / 200.0; wavePower += sin((dist + CoronaTotalTime)); } return vec4( 0.5 + 0.5 \* sin(wavePower), 0.5 + 0.5 \* cos(wavePower), 0.5 + 0.5 \* sin(CoronaTotalTime), 1 ); }
I am checking for system.getInfo( “gpuSupportsHighPrecisionFragmentShaders” ) == true before running the shader.
Any ideas?