summaryrefslogtreecommitdiff
path: root/examples/hello.lc
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hello.lc')
-rw-r--r--examples/hello.lc8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/hello.lc b/examples/hello.lc
index 4254a69..20f8292 100644
--- a/examples/hello.lc
+++ b/examples/hello.lc
@@ -3,11 +3,11 @@ sampler = Sampler PointFilter MirroredRepeat (Texture2DSlot "diffuseTexture")
3main = let 3main = let
4 emptyFB = FrameBuffer (colorImage1 (V4 0.0 0.0 0.4 1.0)) 4 emptyFB = FrameBuffer (colorImage1 (V4 0.0 0.0 0.4 1.0))
5 rasterCtx = TriangleCtx CullNone PolygonFill NoOffset LastVertex 5 rasterCtx = TriangleCtx CullNone PolygonFill NoOffset LastVertex
6 fragmentCtx = AccumulationContext (ColorOp NoBlending (V4 True True True True)) 6 fragmentCtx = (ColorOp NoBlending (V4 True True True True))
7 vertexShader (p,uv) = VertexOut (rotMatrixZ time *. (V4 p%x p%y (-1) 1)) 1.0 () (Smooth uv) 7 vertexShader (p,uv) = VertexOut (rotMatrixZ time *. (V4 p%x p%y (-1) 1)) 1.0 () (Smooth uv)
8 vertexStream = Fetch "objects" Triangles (Attribute "position" :: Vec 2 Float, Attribute "uv" :: Vec 2 Float) 8 vertexStream = Fetch @Triangle "objects" (Attribute "position" :: Vec 2 Float, Attribute "uv" :: Vec 2 Float)
9 primitiveStream = Transform vertexShader vertexStream 9 primitiveStream = Transform vertexShader vertexStream
10 fragmentStream = Rasterize rasterCtx primitiveStream 10 fragmentStream = Rasterize rasterCtx primitiveStream
11 fragmentShader uv = FragmentOut $ texture2D sampler uv 11 fragmentShader = FragmentShader $ \uv -> texture2D sampler uv
12 frame = Accumulate fragmentCtx PassAll fragmentShader fragmentStream emptyFB 12 frame = accumulate fragmentCtx PassAll fragmentShader fragmentStream emptyFB
13 in ScreenOut frame 13 in ScreenOut frame