         {
             float h = DE(ro + rd * t).x;
             res = min(res, k * h / t);
-            t += clamp(h, 0.01, 0.1);
-            if (h < 0.001 || t > tmax)
+            t += clamp(h, 0.001, 0.005);
+            if (h < 1e-4 || t > tmax)
                 break;
         }
     return clamp(res, 0.0, 1.0);

                    vec3 up = vec3(0.0, 0.0, 1.0);
                    // set camera
                    vec3 ro = camera;
                    R(ro.xy, T);
                    mat3 M = viewMatrix(ro, lookat, up);
                    // put screen at distance FOV_DISt in front of the camera
                    vec3 rd = M * normalize(vec3(uv, -FOV_DIST));

            vec3 ref = reflect(rd, nor);

            float occ = calcAO(pos, nor);
            float amb = clamp(0.5 + 0.5 * nor.y, 0.0, 1.0);
            float dif = clamp(dot(nor, lig), 0.0, 1.0);
            float fre = pow(clamp(1.0 + dot(nor, rd), 0.0, 1.0), 2.0);
            float spe = pow(clamp(dot(ref, lig), 0.0, 1.0), 16.0);
            dif *= 0.5 + 0.5 * softShadow(pos, lig, 0.02, 3.0, 12.0);

            vec3 lin = vec3(0.5);
            lin += 2.3 * dif * vec3(1.0, 0.8, 0.55);
            lin += 2.0 * spe * vec3(1.0, 0.9, 0.7) * dif;
            lin += 0.5 * amb * vec3(0.4, 0.6, 1.0) * occ;
            lin += 0.25 * fre * vec3(1.0) * occ;

            // attenuate
            float atten = 1.0 / (1.0 + t * t * 0.05);
            // multiply "col" and "occ" twice and gamma correct it back later gives better result
            col *= lin * atten * col * occ;
            // fog
            col = mix(col, background, smoothstep(0.0, 0.95, t / MAX_TRACE_DIST));
        }
    return sqrt(col);
}

void main()
