-- 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"))