diff options
Diffstat (limited to 'examples/hello.lc')
-rw-r--r-- | examples/hello.lc | 3 |
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 @@ | |||
1 | time = Uniform "time" :: Float | ||
1 | sampler = Sampler PointFilter MirroredRepeat (Texture2DSlot "diffuseTexture") | 2 | sampler = Sampler PointFilter MirroredRepeat (Texture2DSlot "diffuseTexture") |
2 | main = let | 3 | main = 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 |