summaryrefslogtreecommitdiff
path: root/examples/hello.lc
diff options
context:
space:
mode:
authorCsaba Hruska <csaba.hruska@gmail.com>2016-01-10 23:05:00 +0100
committerCsaba Hruska <csaba.hruska@gmail.com>2016-01-10 23:05:00 +0100
commit49e943af3c5e5e6d48aeecc3f93afbc2fc8a94a1 (patch)
tree18803382f14481452772ae9e4f37556af52246be /examples/hello.lc
parent2344d2af7eb3e5515408d134a074b989e7b5efde (diff)
update hello.lc
Diffstat (limited to 'examples/hello.lc')
-rw-r--r--examples/hello.lc3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/hello.lc b/examples/hello.lc
index 1087fbe..4254a69 100644
--- a/examples/hello.lc
+++ b/examples/hello.lc
@@ -1,9 +1,10 @@
1time = Uniform "time" :: Float
1sampler = Sampler PointFilter MirroredRepeat (Texture2DSlot "diffuseTexture") 2sampler = Sampler PointFilter MirroredRepeat (Texture2DSlot "diffuseTexture")
2main = let 3main = let
3 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))
4 rasterCtx = TriangleCtx CullNone PolygonFill NoOffset LastVertex 5 rasterCtx = TriangleCtx CullNone PolygonFill NoOffset LastVertex
5 fragmentCtx = AccumulationContext (ColorOp NoBlending (V4 True True True True)) 6 fragmentCtx = AccumulationContext (ColorOp NoBlending (V4 True True True True))
6 vertexShader (p,uv) = VertexOut (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)
7 vertexStream = Fetch "objects" Triangles (Attribute "position" :: Vec 2 Float, Attribute "uv" :: Vec 2 Float) 8 vertexStream = Fetch "objects" Triangles (Attribute "position" :: Vec 2 Float, Attribute "uv" :: Vec 2 Float)
8 primitiveStream = Transform vertexShader vertexStream 9 primitiveStream = Transform vertexShader vertexStream
9 fragmentStream = Rasterize rasterCtx primitiveStream 10 fragmentStream = Rasterize rasterCtx primitiveStream