Problem with material on the mobiles (HTML5, Android)

The shader on the computer draws a circle as it should, but on a mobile device (HTML5) it’s gigantic and I’m not sure it’s a circle.

on the PC (I clicked in different places):

on a mobile device (i touched once at the far left):

Please share some shader code

3 Likes

on xiaomi phones, drawing a circle using ‘step’ does not draw a circle:

float draw_circle(vec2 coord, float radius) {
    return step(length(coord), radius);
}

I replaced this code with:

float circle(in vec2 _st, in float _radius){
    vec2 dist = _st-vec2(0.0);
    return 1.-smoothstep(_radius-(_radius*0.01),
    _radius+(_radius*0.01),
    dot(dist,dist)*4.0);
}

its worked, but because of smoothing it began to freeze