x=map(ori+(dir*tx));
  float res=0.0;
  if(hx&gt;0.0){
    pOut=ori+(dir*tx);
    res=tx;
  }else{
    float hm=map(ori+(dir*tm));
    float tmid=0.0;
    for(int val1=0;val1&lt;NUM_STEPS;val1=val1+1){
      tmid=mix(tm,tx,hm/(hm-hx));
      pOut=ori+(dir*tmid);
      float hmid=map(pOut);
      if(hmid&lt;0.0){
        tx=tmid;
        hx=hmid;
      }else{
        tm=tmid;
        hm=hmid;
      }
    }
    res=tmid;
  }
  return res;
}
vec3 getPixel(in vec2 coord,in float time){
  vec2 uv=coord/iResoluti