Issue with OPENGL ES rendering for Android and iOS

Hi All,

I have run the same fragment shader program on Android and iOS and got 2 different drawing as below:



The color in iOS are not real compared to android.

Here is my shader program:

uniform mediump vec4 InnerColor;
uniform mediump vec4 OuterColor;
uniform mediump float RadiusInner;
uniform mediump float RadiusOuter;

varying mediump vec2 TexCoord;

void main() {
    mediump float dx = TexCoord.x;
    mediump float dy = TexCoord.y;
    mediump float dist = sqrt(dx * dx + dy * dy);
    gl_FragColor = mix( InnerColor, OuterColor, smoothstep( RadiusInner, RadiusOuter, dist ));

Please advise.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.