blob: 7c4073c3f25e1c360a14d0df4658f5a91e79adce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
main = let
emptyFB = FrameBuffer ((colorImage1 (V4 0.0 0.0 0.4 1.0))
rasterCtx = TriangleCtx CullNone PolygonFill NoOffset LastVertex
colorOp = ColorOp NoBlending (V4 True True True True)
fragmentCtx = accumulationContext colorOp
vertexShader ((v)) = VertexOut v 1.0 () (Smooth v)
vertexStream = fetch "stream" Triangle (Attribute "position" :: ((Vec 4 Float)))
primitiveStream = Transform vertexShader vertexStream
fragmentStream = Rasterize rasterCtx primitiveStream
fragmentShader = FragmentShader $ \((v)) -> 1.0
frame = accumulate fragmentCtx PassAll fragmentShader fragmentStream emptyFB
in ScreenOut frame
|