anchor.diff:      let afterFinal = RenderPass.after "blubber" RenderPassOrder.Arbitrary final
       
       let group = Mod.init 0
  -    let debug = false
  -    let currentGroup = outlineAndTriangles |> Mod.map2 (fun i (_,_,g) -> g.[i % g.Count]) group
  +    let debug = true
  +    let currentGroup = outlineAndTriangles |> Mod.map2 (fun i (o,t,g) -> if i < 0 then (t,o) else g.[i % g.Count]) group
       let lines = if debug then currentGroup |> Mod.map snd else outlineAndTriangles |> Mod.map (fun (l,_,_) -> l)
       let capTriangles = if debug then currentGroup |> Mod.map fst else outlineAndTriangles |> Mod.map (fun (_,t,_) -> t)
       let helpers =
  
positive.code: 
                  for ti in 0..triangles.Length-1 do
                      let t = triangles.[ti]
                      let mutable n0 = store.Query(t.P0, 0.0) |> Set.ofSeq
                      let mutable n1 = store.Query(t.P1, 0.0) |> Set.ofSeq
                      let mutable n2 = store.Query(t.P2, 0.0) |> Set.ofSeq
  
  
                      let all = Set.intersect n0 (Set.intersect n1 n2) |> Set.remove ti
  
negative.code:                                 let p0t = ei
                                  let p1t = (ei + 1) % 3
                                  let p2t = (ei + 2) % 3
  
                                  
  
  
  
                                  let valid, p0o, p1o, p2o =
                                      let s0 = Set.contains i pointTriangles.[3 * oi + 0]
                                      let s1 = Set.contains i pointTriangles.[3 * oi + 1]
                                      let s2 = Set.contains i pointTriangles.[3 * oi + 2]
  
                                      match s0, s1, s2 with
                                          | true, true, false -> true,0, 1, 2
                                          | true, false, true -> true,0, 2, 1
                                          | false, true, true -> true,1, 2, 0
                                          | _ -> 
                                              Log.warn "broken"
                                              false, 0, 0, 0
  
  
                                  
                                  if not valid then 
                                      false
                                  else
                                      let line = Vec.normalize (t.[p1t] - t.[p0t])
                                      let n = Vec.cross (t.[p0t] - viewPos) line |> Vec.normalize
                                      let plane = Plane3d(n, t.[p0t])
  
                                      let ht = plane.Height t.[p2t]
                                      let ho = plane.Height o.[p2o]
  
                                      if ht * ho > 0.0 then
                                          false
                                      else
                                          true
  
  //
  //                                    let ne = Vec.normalize (t.[p1t] - t.[p0t])
  //                            
  //                                    let pn = Vec.cross ne t.Normal |> Vec.normalize
  //                                    let plane = Plane3d(pn, t.[p0t])
  //
  //                                    let ht2 = plane.Height t.[p2t]
  //                                    let ho2 = plane.Height o.[p2o]
  //
  //                                    if ho2 * ht2 > 0.0 then
  //                                        false
  //                                    else
  //                                        let rotT = Vec.cross (t.ComputeCentroid() - t.[p0t]) t.Normal |> Vec.dot ne
  //                                        let rotO = Vec.cross (o.ComputeCentroid() - t.[p0t]) o.Normal |> Vec.dot ne
  //
  //                                        rotO * rotT < 0.0
                              
  
                              let t01 = Set.intersect t0 t1 |> Set.filter (fun n -> testSet.Contains n && valid 0 n)
                              let t12 = Set.intersect t1 t2 |> Set.filter (fun n -> testSet.Contains n && valid 1 n)
                              let t20 = Set.intersect t2 t0 |> Set.filter (fun n -> testSet.Contains n && valid 2 n)
  
                              //let front = frontFacing.Contains i
  
                              if front then addCap t.Reversed |> ignore
                              else addCap t |> ignore
  