summaryrefslogtreecommitdiff
path: root/testdata/bug/infer01.wip.lc
blob: ec1b53fd6c09dc0b0958e2d21215f40f75cec1bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- works with type signature
--frag :: (Vec 4 Float,Vec 2 Float) -> Vec 4 Float
frag = \(x,uv) -> x

makeFrame (vertexstream :: PrimitiveStream Triangle (Vec 4 Float,Vec 2 Float))

          = imageFrame (emptyDepthImage 1, emptyColorImage navy)
  `overlay` fragments
  where
    fragments =
          vertexstream
        & mapPrimitives (\(x,uv) -> (x,x,uv))
        & rasterizePrimitives (TriangleCtx CullNone PolygonFill NoOffset LastVertex) (Smooth,Smooth)
        & mapFragments frag
        & accumulateWith (DepthOp Less True, ColorOp NoBlending (V4 True True True True))

main = renderFrame $
   makeFrame (fetch "stream4" (Attribute "position4",Attribute "vertexUV"))