Legacy GM Shader issues with HTML5 in Safari/Silk

Focksbot

Member
Apologies - I posted a variation on this problem before, but having spent a couple more days working on it, I wanted to raise it again in a more coherent manner.

I've been testing my game on various browsers, and found that the shader I'm using doesn't work on iOS Safari or Amazon Silk. It draws over the whole surface at the GUI layer, creating a gaussian blur effect at certain intervals. In those browsers mentioned, however, it draws a blank canvas.

I've been unsuccessful at blocking the shader for these browsers. In-game browser detection doesn't seem to stop the shader running, nor does checking whether it has compiled correctly.

This is the code for the shader I'm using - not my code, I hasten to add, but taken from Xor's tutorials:

Code:
varying vec2 v_vTexcoord;
varying vec4 v_vColour;
uniform vec3 size;//width,height,radius

const int Quality = 8;
const int Directions = 16;
const float Pi = 6.28318530718;//pi * 2

void main()
{
    vec2 radius = size.z/size.xy;
    vec4 Color = texture2D( gm_BaseTexture, v_vTexcoord);
    for( float d=0.0;d<Pi;d+=Pi/float(Directions) )
    {
        for( float i=1.0/float(Quality);i<=1.0;i+=1.0/float(Quality) )
        {
                Color += texture2D( gm_BaseTexture, v_vTexcoord+vec2(cos(d),sin(d))*radius*i);
        }
    }
    Color /= float(Quality)*float(Directions)+1.0;
    gl_FragColor =  Color *  v_vColour;
}
Is anyone aware of any further measures I could take, any reason Safari and Silk in particular seem to be affected? (Also, I haven't tested Opera). Forcing webgl doesn't make any difference either.
 
Top