diff options
author | Csaba Hruska <csaba.hruska@gmail.com> | 2016-02-27 01:04:23 +0100 |
---|---|---|
committer | Csaba Hruska <csaba.hruska@gmail.com> | 2016-02-27 01:04:23 +0100 |
commit | 0dcc32b6c7233ef4a888fee14fa57d647df531fb (patch) | |
tree | 870e7a47de5f2d0a90fc33ded4af1e804b9ad188 /testdata/editor-examples/Cube.lc | |
parent | 92f557c8e2dd5f0af5d87520786b6ed28a333973 (diff) |
cleanup MVP from editor examples
Diffstat (limited to 'testdata/editor-examples/Cube.lc')
-rw-r--r-- | testdata/editor-examples/Cube.lc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/testdata/editor-examples/Cube.lc b/testdata/editor-examples/Cube.lc index bdd218b8..7efaf32b 100644 --- a/testdata/editor-examples/Cube.lc +++ b/testdata/editor-examples/Cube.lc | |||
@@ -1,9 +1,13 @@ | |||
1 | makeFrame (projmat :: Mat 4 4 Float) | 1 | makeFrame (time :: Float) |
2 | (vertexstream :: PrimitiveStream Triangle ((Vec 4 Float))) | 2 | (vertexstream :: PrimitiveStream Triangle ((Vec 4 Float))) |
3 | 3 | ||
4 | = imageFrame (emptyDepthImage 1, emptyColorImage navy) | 4 | = imageFrame (emptyDepthImage 1, emptyColorImage navy) |
5 | `overlay` fragments | 5 | `overlay` fragments |
6 | where | 6 | where |
7 | projmat = perspective 0.1 100.0 (30 * pi / 180) 1.0 | ||
8 | .*. lookat (V3 3.0 1.3 0.3) (V3 0.0 0.0 0.0) (V3 0.0 1.0 0.0) | ||
9 | .*. rotMatrixY (pi / 24.0 * time) | ||
10 | |||
7 | fragments = | 11 | fragments = |
8 | vertexstream | 12 | vertexstream |
9 | & mapPrimitives (\((x)) -> (scale 0.5 (projmat *. x), x)) | 13 | & mapPrimitives (\((x)) -> (scale 0.5 (projmat *. x), x)) |
@@ -11,6 +15,6 @@ makeFrame (projmat :: Mat 4 4 Float) | |||
11 | & accumulateWith (DepthOp Less True, ColorOp NoBlending (V4 True True True True)) | 15 | & accumulateWith (DepthOp Less True, ColorOp NoBlending (V4 True True True True)) |
12 | 16 | ||
13 | main = renderFrame $ | 17 | main = renderFrame $ |
14 | makeFrame (Uniform "MVP") | 18 | makeFrame (Uniform "Time") |
15 | (fetch "stream4" (Attribute "position4")) | 19 | (fetch "stream4" (Attribute "position4")) |
16 | 20 | ||