diff options
Diffstat (limited to 'testdata/pickInt.lc')
-rw-r--r-- | testdata/pickInt.lc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/testdata/pickInt.lc b/testdata/pickInt.lc new file mode 100644 index 00000000..3c2dba84 --- /dev/null +++ b/testdata/pickInt.lc | |||
@@ -0,0 +1,25 @@ | |||
1 | -- Tests: | ||
2 | -- 1. Pipeline targeting a render texture (TextureOut), instead of a Screenout. | ||
3 | -- 2. Integer color components for the output | ||
4 | |||
5 | type FB = FrameBuffer 1 '[ 'Color (Vec 4 Int)] | ||
6 | |||
7 | scene :: String -> FB -> FB | ||
8 | scene name prevFB = | ||
9 | Accumulate ((ColorOp NoBlending (one :: Vec 4 Bool))) | ||
10 | (mapFragments (\(uv, rgba) -> ((rgba))) | ||
11 | $ rasterizePrimitives (TriangleCtx CullFront PolygonFill NoOffset LastVertex) (Flat, Flat) | ||
12 | $ mapPrimitives | ||
13 | (\(pos, color, id)-> | ||
14 | ( (Uniform "viewProj" :: Mat 4 4 Float) *. (V4 pos%x pos%y 0 1) | ||
15 | , V2 0.0 0.0 | ||
16 | , V4 0 0 0 id)) | ||
17 | $ fetch name ( Attribute "position" :: Vec 3 Float | ||
18 | , Attribute "color" :: Vec 4 Float | ||
19 | , Attribute "id" :: Int)) | ||
20 | prevFB | ||
21 | |||
22 | main :: Output | ||
23 | main = TextureOut (V2 800 600) $ | ||
24 | scene "objects" $ | ||
25 | FrameBuffer ((colorImage1 (V4 0 0 0 0))) | ||