anchor.diff:                  let ll3 = l3.Length
   
   
  -                let t0 = ll0 / pixelSize |> int |> float
  -                let t1 = ll1 / pixelSize |> int |> float
  -                let t2 = ll2 / pixelSize |> int |> float
  -                let t3 = ll3 / pixelSize |> int |> float
  -
  -                let avg = (t0 + t1 + t2 + t3) / 4.0
  -
  +                let t0 = ll0 / texelSize 
  +                let t1 = ll1 / texelSize 
  +                let t2 = ll2 / texelSize 
  +                let t3 = ll3 / texelSize 
  +
  +                let i0 = 0.5 * (t1 + t3)
  +                let i1 = 0.5 * (t0 + t2)
                   //return { innerLevel = [|1.0; 1.0|]; outerLevel = [| 1.0; 1.0; 1.0; 1.0 |]} 
  -                return { innerLevel = [|avg; avg|]; outerLevel = [| t0; t1; t2; t3 |]}  
  +                return { innerLevel = [|i0; i1|]; outerLevel = [| t0; t1; t2; t3 |]}  
               }
   
           let pgmTessEval (m : Patch4<Vertex>) =
               tessEval {
                   let c = m.TessCoord.XY
   
  -                let p0 = m.P0.wp * (1.0 - c.X) + m.P1.wp * c.X
  -                let p1 = m.P2.wp * (1.0 - c.X) + m.P3.wp * c.X
  -                let wp = p0 * (1.0 - c.Y) + p1 * c.Y
  -
  -                let wp = sampleHeight wp
  +                let wp = interpolate4 c m.P0.wp m.P1.wp m.P2.wp m.P3.wp
  +                let tc, dtx, dty = gradient2 c m.P0.tc m.P1.tc m.P2.tc m.P3.tc
  +
  +
  +                let h = heightSampler.SampleGrad(tc, dtx, dty).X * 1.5
  +                let wp = wp + V4d(0.0, 0.0, h, 0.0)
  +
  +
  +
   
                   return {
                       pos = uniform.ViewProjTrafo * wp
                       wp = wp
                       dir = V3d.OOI
                       n = V3d.OOI
  -                    tc = V2d(0.5, 0.5) + wp.XY / planeSize
  +                    tc = tc
                   }
               }
   
  
positive.code:                 let min, max = bounds m.P0.wp m.P1.wp m.P2.wp m.P3.wp
                  let offscreen = boxOutsideFrustum min max uniform.ViewProjTrafo
  
                  let t0 = if offscreen then 0.0 else ll0 / pixelSize |> clamp 1.0 64.0
                  let t1 = if offscreen then 0.0 else ll1 / pixelSize |> clamp 1.0 64.0
                  let t2 = if offscreen then 0.0 else ll2 / pixelSize |> clamp 1.0 64.0
                  let t3 = if offscreen then 0.0 else ll3 / pixelSize |> clamp 1.0 64.0
  
                  let avg = (t0 + t1 + t2 + t3) / 4.0
  
  
negative.code:                 let tc2 = m.P2.tc
  
  
                  let u = 1.0 * (tc1 - tc0)
                  let v = 1.0 * (tc2 - tc0)
  
                  
                  let h0 = heightSampler.SampleGrad(tc0, u, v).X * heightScale
  