diff options
Diffstat (limited to 'testdata')
-rw-r--r-- | testdata/Builtins.out | 163 | ||||
-rw-r--r-- | testdata/graphics-features/pickInt.lc | 25 | ||||
-rw-r--r-- | testdata/graphics-features/pickInt.out | 111 | ||||
-rw-r--r-- | testdata/graphics-features/pickInt.ppl | 110 |
4 files changed, 347 insertions, 62 deletions
diff --git a/testdata/Builtins.out b/testdata/Builtins.out index 654876f7..13c62398 100644 --- a/testdata/Builtins.out +++ b/testdata/Builtins.out | |||
@@ -1291,6 +1291,8 @@ PrjImageColor | |||
1291 | 1291 | ||
1292 | data Output :: Type where | 1292 | data Output :: Type where |
1293 | ScreenOut :: forall (a :: _) (b :: _) . FrameBuffer a b -> Output | 1293 | ScreenOut :: forall (a :: _) (b :: _) . FrameBuffer a b -> Output |
1294 | TextureOut | ||
1295 | :: forall (c :: _) (d :: _) . Vec (fromInt 2) Int -> FrameBuffer c d -> Output | ||
1294 | 1296 | ||
1295 | renderFrame = _lhs renderFrame (_rhs ScreenOut) | 1297 | renderFrame = _lhs renderFrame (_rhs ScreenOut) |
1296 | 1298 | ||
@@ -1658,7 +1660,8 @@ accumulationContext = _lhs accumulationContext \(a :: _) -> _rhs a | |||
1658 | 'Maybe = <<type constructor with 0 indices; constructors: Nothing, Just>> | 1660 | 'Maybe = <<type constructor with 0 indices; constructors: Nothing, Just>> |
1659 | 1661 | ||
1660 | 'Output :: Type | 1662 | 'Output :: Type |
1661 | 'Output = <<type constructor with 0 indices; constructors: ScreenOut>> | 1663 | 'Output |
1664 | = <<type constructor with 0 indices; constructors: ScreenOut, TextureOut>> | ||
1662 | 1665 | ||
1663 | 'PointSize :: Type -> Type | 1666 | 'PointSize :: Type -> Type |
1664 | 'PointSize | 1667 | 'PointSize |
@@ -2489,6 +2492,10 @@ Texture2D = <<1st constructor of 'Texture>> | |||
2489 | Texture2DSlot :: String -> Texture | 2492 | Texture2DSlot :: String -> Texture |
2490 | Texture2DSlot = <<0th constructor of 'Texture>> | 2493 | Texture2DSlot = <<0th constructor of 'Texture>> |
2491 | 2494 | ||
2495 | TextureOut | ||
2496 | :: forall (a :: Nat) (b :: [ImageKind]) . Vec 2 Int -> FrameBuffer a b -> Output | ||
2497 | TextureOut = <<1st constructor of 'Output>> | ||
2498 | |||
2492 | Triangle :: PrimitiveType | 2499 | Triangle :: PrimitiveType |
2493 | Triangle = <<0th constructor of 'PrimitiveType>> | 2500 | Triangle = <<0th constructor of 'PrimitiveType>> |
2494 | 2501 | ||
@@ -2726,8 +2733,10 @@ case'Output | |||
2726 | :: forall (a :: Output -> Type) | 2733 | :: forall (a :: Output -> Type) |
2727 | -> (forall (b :: Nat) (c :: [ImageKind]) | 2734 | -> (forall (b :: Nat) (c :: [ImageKind]) |
2728 | . forall (d :: FrameBuffer b c) -> a ('ScreenOut b c d)) | 2735 | . forall (d :: FrameBuffer b c) -> a ('ScreenOut b c d)) |
2729 | -> forall (e :: Output) -> a e | 2736 | -> (forall (e :: Nat) (f :: [ImageKind]) |
2730 | case'Output = \a b c -> <<case function of a type with 0 parameters>> | 2737 | . forall (g :: Vec 2 Int) (h :: FrameBuffer e f) -> a ('TextureOut e f g h)) |
2738 | -> forall (i :: Output) -> a i | ||
2739 | case'Output = \a b c d -> <<case function of a type with 0 parameters>> | ||
2731 | 2740 | ||
2732 | case'PointSize | 2741 | case'PointSize |
2733 | :: forall a | 2742 | :: forall a |
@@ -8584,8 +8593,8 @@ zero | |||
8584 | Type | 8593 | Type |
8585 | 540:6-540:12 | 8594 | 540:6-540:12 |
8586 | Type | Type | Type | Type | 8595 | Type | Type | Type | Type |
8587 | 540:6-541:12 | 8596 | 540:6-542:13 |
8588 | Type | 8597 | Type | Type |
8589 | 541:3-541:12 | 8598 | 541:3-541:12 |
8590 | forall (a :: Nat) (b :: [ImageKind]) | 8599 | forall (a :: Nat) (b :: [ImageKind]) |
8591 | . FrameBuffer a b -> Output | Output | Type | Type | Type | Type | 8600 | . FrameBuffer a b -> Output | Output | Type | Type | Type | Type |
@@ -8603,120 +8612,150 @@ zero | |||
8603 | _b | 8612 | _b |
8604 | 541:45-541:51 | 8613 | 541:45-541:51 |
8605 | Type | Type | 8614 | Type | Type |
8606 | 543:1-543:12 | 8615 | 542:3-542:13 |
8616 | forall (a :: Nat) (b :: [ImageKind]) | ||
8617 | . Vec 2 Int | ||
8618 | -> FrameBuffer a b -> Output | Output | Type | Type | Type | Type | Type | ||
8619 | 542:26-542:29 | ||
8620 | Nat -> Type -> Type | ||
8621 | 542:26-542:31 | ||
8622 | Type -> Type | ||
8623 | 542:26-542:35 | ||
8624 | Type | ||
8625 | 542:26-542:64 | ||
8626 | Type | Type | ||
8627 | 542:30-542:31 | ||
8628 | _b | ||
8629 | 542:32-542:35 | ||
8630 | Type | ||
8631 | 542:39-542:50 | ||
8632 | Nat -> [ImageKind] -> Type | ||
8633 | 542:39-542:52 | ||
8634 | [ImageKind] -> Type | ||
8635 | 542:39-542:54 | ||
8636 | Type | ||
8637 | 542:39-542:64 | ||
8638 | Type | ||
8639 | 542:51-542:52 | ||
8640 | _e | ||
8641 | 542:53-542:54 | ||
8642 | _c | ||
8643 | 542:58-542:64 | ||
8644 | Type | Type | ||
8645 | 544:1-544:12 | ||
8607 | forall (a :: Nat) (b :: [ImageKind]) . FrameBuffer a b -> Output | 8646 | forall (a :: Nat) (b :: [ImageKind]) . FrameBuffer a b -> Output |
8608 | 543:15-543:24 | 8647 | 544:15-544:24 |
8609 | forall (a :: Nat) (b :: [ImageKind]) . FrameBuffer a b -> Output | 8648 | forall (a :: Nat) (b :: [ImageKind]) . FrameBuffer a b -> Output |
8610 | 549:6-549:13 | 8649 | 550:6-550:13 |
8611 | Type | Type | Type | Type | 8650 | Type | Type | Type | Type |
8612 | 549:6-553:12 | 8651 | 550:6-554:12 |
8613 | Type | Type | 8652 | Type | Type |
8614 | 550:3-550:16 | 8653 | 551:3-551:16 |
8615 | String -> Texture | Texture | Type | Type | 8654 | String -> Texture | Texture | Type | Type |
8616 | 550:20-550:26 | 8655 | 551:20-551:26 |
8617 | Type | 8656 | Type |
8618 | 551:20-551:27 | 8657 | 552:20-552:27 |
8619 | Type | Type | 8658 | Type | Type |
8620 | 553:3-553:12 | 8659 | 554:3-554:12 |
8621 | Vec 2 Int | 8660 | Vec 2 Int |
8622 | -> Image 1 ('Color (Vec 4 Float)) -> Texture | Texture | Type | Type | Type | 8661 | -> Image 1 ('Color (Vec 4 Float)) -> Texture | Texture | Type | Type | Type |
8623 | 553:20-553:23 | 8662 | 554:20-554:23 |
8624 | Nat -> Type -> Type | 8663 | Nat -> Type -> Type |
8625 | 553:20-553:25 | 8664 | 554:20-554:25 |
8626 | Type -> Type | 8665 | Type -> Type |
8627 | 553:20-553:29 | 8666 | 554:20-554:29 |
8628 | Type | 8667 | Type |
8629 | 553:24-553:25 | 8668 | 554:24-554:25 |
8630 | _b | 8669 | _b |
8631 | 553:26-553:29 | 8670 | 554:26-554:29 |
8632 | Type | 8671 | Type |
8633 | 554:20-554:25 | 8672 | 555:20-555:25 |
8634 | Nat -> ImageKind -> Type | 8673 | Nat -> ImageKind -> Type |
8635 | 554:20-554:27 | 8674 | 555:20-555:27 |
8636 | ImageKind -> Type | 8675 | ImageKind -> Type |
8637 | 554:20-554:49 | 8676 | 555:20-555:49 |
8638 | Type | 8677 | Type |
8639 | 554:20-555:27 | 8678 | 555:20-556:27 |
8640 | Type | 8679 | Type |
8641 | 554:26-554:27 | 8680 | 555:26-555:27 |
8642 | _b | 8681 | _b |
8643 | 554:29-554:34 | 8682 | 555:29-555:34 |
8644 | Type -> ImageKind | 8683 | Type -> ImageKind |
8645 | 554:29-554:48 | 8684 | 555:29-555:48 |
8646 | ImageKind | 8685 | ImageKind |
8647 | 554:36-554:39 | 8686 | 555:36-555:39 |
8648 | Nat -> Type -> Type | 8687 | Nat -> Type -> Type |
8649 | 554:36-554:41 | 8688 | 555:36-555:41 |
8650 | Type -> Type | 8689 | Type -> Type |
8651 | 554:36-554:47 | 8690 | 555:36-555:47 |
8652 | Type | 8691 | Type |
8653 | 554:40-554:41 | 8692 | 555:40-555:41 |
8654 | _b | 8693 | _b |
8655 | 554:42-554:47 | 8694 | 555:42-555:47 |
8656 | Type | 8695 | Type |
8657 | 555:20-555:27 | 8696 | 556:20-556:27 |
8658 | Type | Type | 8697 | Type | Type |
8659 | 557:6-557:12 | 8698 | 558:6-558:12 |
8660 | Type | Type | Type | Type | Type | Type | 8699 | Type | Type | Type | Type | Type | Type |
8661 | 557:6-559:17 | 8700 | 558:6-560:17 |
8662 | Type | Type | 8701 | Type | Type |
8663 | 558:5-558:16 | 8702 | 559:5-559:16 |
8664 | Filter | 8703 | Filter |
8665 | 559:5-559:17 | 8704 | 560:5-560:17 |
8666 | Filter | 8705 | Filter |
8667 | 561:6-561:14 | 8706 | 562:6-562:14 |
8668 | Type | Type | Type | Type | Type | Type | Type | 8707 | Type | Type | Type | Type | Type | Type | Type |
8669 | 561:6-564:16 | 8708 | 562:6-565:16 |
8670 | Type | Type | Type | 8709 | Type | Type | Type |
8671 | 562:5-562:11 | 8710 | 563:5-563:11 |
8672 | EdgeMode | 8711 | EdgeMode |
8673 | 563:5-563:19 | 8712 | 564:5-564:19 |
8674 | EdgeMode | 8713 | EdgeMode |
8675 | 564:5-564:16 | 8714 | 565:5-565:16 |
8676 | EdgeMode | 8715 | EdgeMode |
8677 | 566:6-566:13 | 8716 | 567:6-567:13 |
8678 | Type | Type | Type | Type | Type | Type | 8717 | Type | Type | Type | Type | Type | Type |
8679 | 566:6-566:23 | 8718 | 567:6-567:23 |
8680 | Type | 8719 | Type |
8681 | 566:6-566:47 | 8720 | 567:6-567:47 |
8682 | Type | Type | 8721 | Type | Type |
8683 | 566:16-566:23 | 8722 | 567:16-567:23 |
8684 | Filter -> EdgeMode -> Texture -> Sampler | Sampler | Type | Type | Type | Type | 8723 | Filter -> EdgeMode -> Texture -> Sampler | Sampler | Type | Type | Type | Type |
8685 | 566:24-566:30 | 8724 | 567:24-567:30 |
8686 | Type | 8725 | Type |
8687 | 566:31-566:39 | 8726 | 567:31-567:39 |
8688 | Type | 8727 | Type |
8689 | 566:40-566:47 | 8728 | 567:40-567:47 |
8690 | Type | 8729 | Type |
8691 | 569:1-569:10 | 8730 | 570:1-570:10 |
8692 | Sampler -> Vec 2 Float -> Vec 4 Float | 8731 | Sampler -> Vec 2 Float -> Vec 4 Float |
8693 | 569:14-569:21 | 8732 | 570:14-570:21 |
8694 | Type | 8733 | Type |
8695 | 569:25-569:28 | 8734 | 570:25-570:28 |
8696 | Nat -> Type -> Type | 8735 | Nat -> Type -> Type |
8697 | 569:25-569:30 | 8736 | 570:25-570:30 |
8698 | Type -> Type | 8737 | Type -> Type |
8699 | 569:25-569:36 | 8738 | 570:25-570:36 |
8700 | Type | 8739 | Type |
8701 | 569:25-569:51 | 8740 | 570:25-570:51 |
8702 | Type | 8741 | Type |
8703 | 569:29-569:30 | 8742 | 570:29-570:30 |
8704 | _b | 8743 | _b |
8705 | 569:31-569:36 | 8744 | 570:31-570:36 |
8706 | Type | 8745 | Type |
8707 | 569:40-569:43 | 8746 | 570:40-570:43 |
8708 | Nat -> Type -> Type | 8747 | Nat -> Type -> Type |
8709 | 569:40-569:45 | 8748 | 570:40-570:45 |
8710 | Type -> Type | 8749 | Type -> Type |
8711 | 569:40-569:51 | 8750 | 570:40-570:51 |
8712 | Type | Type | 8751 | Type | Type |
8713 | 569:44-569:45 | 8752 | 570:44-570:45 |
8714 | _b | 8753 | _b |
8715 | 569:46-569:51 | 8754 | 570:46-570:51 |
8716 | Type | 8755 | Type |
8717 | 573:1-573:20 | 8756 | 574:1-574:20 |
8718 | forall a . a -> a | 8757 | forall a . a -> a |
8719 | 573:25-573:26 | 8758 | 574:25-574:26 |
8720 | _b | 8759 | _b |
8721 | ------------ warnings | 8760 | ------------ warnings |
8722 | Uncovered pattern(s) at testdata/Builtins.lc:201:1: | 8761 | Uncovered pattern(s) at testdata/Builtins.lc:201:1: |
diff --git a/testdata/graphics-features/pickInt.lc b/testdata/graphics-features/pickInt.lc new file mode 100644 index 00000000..3c2dba84 --- /dev/null +++ b/testdata/graphics-features/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))) | ||
diff --git a/testdata/graphics-features/pickInt.out b/testdata/graphics-features/pickInt.out new file mode 100644 index 00000000..8812744e --- /dev/null +++ b/testdata/graphics-features/pickInt.out | |||
@@ -0,0 +1,111 @@ | |||
1 | Pipeline | ||
2 | { info = "" | ||
3 | , backend = OpenGL33 | ||
4 | , textures = | ||
5 | [ TextureDescriptor | ||
6 | { textureType = Texture2D (IntT RGBA) 1 | ||
7 | , textureSize = VV2U (V2 800 600) | ||
8 | , textureSemantic = Color | ||
9 | , textureSampler = | ||
10 | SamplerDescriptor | ||
11 | { samplerWrapS = Repeat | ||
12 | , samplerWrapT = Just Repeat | ||
13 | , samplerWrapR = Nothing | ||
14 | , samplerMinFilter = Nearest | ||
15 | , samplerMagFilter = Nearest | ||
16 | , samplerBorderColor = VV4F (V4 0.0 0.0 0.0 1.0) | ||
17 | , samplerMinLod = Nothing | ||
18 | , samplerMaxLod = Nothing | ||
19 | , samplerLodBias = 0.0 | ||
20 | , samplerCompareFunc = Nothing | ||
21 | } | ||
22 | , textureBaseLevel = 0 | ||
23 | , textureMaxLevel = 0 | ||
24 | } | ||
25 | ] | ||
26 | , samplers = [] | ||
27 | , targets = | ||
28 | [ RenderTarget | ||
29 | { renderTargets = | ||
30 | [ TargetItem | ||
31 | { targetSemantic = Color | ||
32 | , targetRef = Just (TextureImage 0 0 Nothing) | ||
33 | } | ||
34 | ] | ||
35 | } | ||
36 | ] | ||
37 | , programs = | ||
38 | [ Program | ||
39 | { programUniforms = fromList [ ( "viewProj" , M44F ) ] | ||
40 | , programStreams = | ||
41 | fromList | ||
42 | [ ( "vi1" , Parameter { name = "position" , ty = V3F } ) | ||
43 | , ( "vi2" , Parameter { name = "color" , ty = V4F } ) | ||
44 | , ( "vi3" , Parameter { name = "id" , ty = Int } ) | ||
45 | ] | ||
46 | , programInTextures = fromList [] | ||
47 | , programOutput = [ Parameter { name = "f0" , ty = V4I } ] | ||
48 | , vertexShader = | ||
49 | """ | ||
50 | #version 330 core | ||
51 | vec4 texture2D(sampler2D s,vec2 uv) { | ||
52 | return texture(s,uv); | ||
53 | } | ||
54 | uniform mat4 viewProj; | ||
55 | in vec3 vi1; | ||
56 | in vec4 vi2; | ||
57 | in int vi3; | ||
58 | flat out vec2 vo1; | ||
59 | flat out ivec4 vo2; | ||
60 | void main() { | ||
61 | gl_Position = (viewProj) * (vec4 ((vi1).x,(vi1).y,0.0,1.0)); | ||
62 | vo1 = vec2 (0.0,0.0); | ||
63 | vo2 = ivec4 (0,0,0,vi3); | ||
64 | } | ||
65 | """ | ||
66 | , geometryShader = Nothing | ||
67 | , fragmentShader = | ||
68 | """ | ||
69 | #version 330 core | ||
70 | vec4 texture2D(sampler2D s,vec2 uv) { | ||
71 | return texture(s,uv); | ||
72 | } | ||
73 | flat in vec2 vo1; | ||
74 | flat in ivec4 vo2; | ||
75 | out ivec4 f0; | ||
76 | void main() { | ||
77 | f0 = vo2; | ||
78 | } | ||
79 | """ | ||
80 | } | ||
81 | ] | ||
82 | , slots = | ||
83 | [ Slot | ||
84 | { slotName = "objects" | ||
85 | , slotStreams = | ||
86 | fromList | ||
87 | [ ( "color" , V4F ) , ( "id" , Int ) , ( "position" , V3F ) ] | ||
88 | , slotUniforms = fromList [ ( "viewProj" , M44F ) ] | ||
89 | , slotPrimitive = Triangles | ||
90 | , slotPrograms = [ 0 ] | ||
91 | } | ||
92 | ] | ||
93 | , streams = [] | ||
94 | , commands = | ||
95 | [ SetRenderTarget 0 | ||
96 | , ClearRenderTarget | ||
97 | [ ClearImage | ||
98 | { imageSemantic = Color , clearValue = VV4I (V4 0 0 0 0) } | ||
99 | ] | ||
100 | , SetProgram 0 | ||
101 | , SetRasterContext | ||
102 | (TriangleCtx (CullFront CCW) PolygonFill NoOffset LastVertex) | ||
103 | , SetAccumulationContext | ||
104 | AccumulationContext | ||
105 | { accViewportName = Nothing | ||
106 | , accOperations = | ||
107 | [ ColorOp NoBlending (VV4B (V4 True True True True)) ] | ||
108 | } | ||
109 | , RenderSlot 0 | ||
110 | ] | ||
111 | } \ No newline at end of file | ||
diff --git a/testdata/graphics-features/pickInt.ppl b/testdata/graphics-features/pickInt.ppl new file mode 100644 index 00000000..742549a3 --- /dev/null +++ b/testdata/graphics-features/pickInt.ppl | |||
@@ -0,0 +1,110 @@ | |||
1 | Pipeline | ||
2 | { info = "generated by lambdacube-compiler 0.6.1.0" | ||
3 | , backend = OpenGL33 | ||
4 | , textures = | ||
5 | [ TextureDescriptor | ||
6 | { textureType = Texture2D (IntT RGBA) 1 | ||
7 | , textureSize = VV2U (V2 800 600) | ||
8 | , textureSemantic = Color | ||
9 | , textureSampler = | ||
10 | SamplerDescriptor | ||
11 | { samplerWrapS = Repeat | ||
12 | , samplerWrapT = Just Repeat | ||
13 | , samplerWrapR = Nothing | ||
14 | , samplerMinFilter = Nearest | ||
15 | , samplerMagFilter = Nearest | ||
16 | , samplerBorderColor = VV4F (V4 0.0 0.0 0.0 1.0) | ||
17 | , samplerMinLod = Nothing | ||
18 | , samplerMaxLod = Nothing | ||
19 | , samplerLodBias = 0.0 | ||
20 | , samplerCompareFunc = Nothing | ||
21 | } | ||
22 | , textureBaseLevel = 0 | ||
23 | , textureMaxLevel = 0 | ||
24 | } | ||
25 | ] | ||
26 | , samplers = [] | ||
27 | , targets = | ||
28 | [ RenderTarget | ||
29 | { renderTargets = | ||
30 | [ TargetItem | ||
31 | { targetSemantic = Color | ||
32 | , targetRef = Just (TextureImage 0 0 Nothing) | ||
33 | } | ||
34 | ] | ||
35 | } | ||
36 | ] | ||
37 | , programs = | ||
38 | [ Program | ||
39 | { programUniforms = fromList [ ( "viewProj" , M44F ) ] | ||
40 | , programStreams = | ||
41 | fromList | ||
42 | [ ( "vi1" , Parameter { name = "position" , ty = V3F } ) | ||
43 | , ( "vi2" , Parameter { name = "uv" , ty = V2F } ) | ||
44 | , ( "vi3" , Parameter { name = "id" , ty = Int } ) | ||
45 | ] | ||
46 | , programInTextures = fromList [] | ||
47 | , programOutput = [ Parameter { name = "f0" , ty = V4I } ] | ||
48 | , vertexShader = | ||
49 | """ | ||
50 | #version 330 core | ||
51 | vec4 texture2D(sampler2D s,vec2 uv) { | ||
52 | return texture(s,uv); | ||
53 | } | ||
54 | uniform mat4 viewProj; | ||
55 | in vec3 vi1; | ||
56 | in vec2 vi2; | ||
57 | in int vi3; | ||
58 | flat out vec2 vo1; | ||
59 | flat out ivec4 vo2; | ||
60 | void main() { | ||
61 | gl_Position = (viewProj) * (vec4 ((vi1).x,(vi1).y,0.0,1.0)); | ||
62 | vo1 = vi2; | ||
63 | vo2 = ivec4 (0,0,0,vi3); | ||
64 | } | ||
65 | """ | ||
66 | , geometryShader = Nothing | ||
67 | , fragmentShader = | ||
68 | """ | ||
69 | #version 330 core | ||
70 | vec4 texture2D(sampler2D s,vec2 uv) { | ||
71 | return texture(s,uv); | ||
72 | } | ||
73 | flat in vec2 vo1; | ||
74 | flat in ivec4 vo2; | ||
75 | out ivec4 f0; | ||
76 | void main() { | ||
77 | f0 = vo2; | ||
78 | } | ||
79 | """ | ||
80 | } | ||
81 | ] | ||
82 | , slots = | ||
83 | [ Slot | ||
84 | { slotName = "stream" | ||
85 | , slotStreams = | ||
86 | fromList [ ( "id" , Int ) , ( "position" , V3F ) , ( "uv" , V2F ) ] | ||
87 | , slotUniforms = fromList [ ( "viewProj" , M44F ) ] | ||
88 | , slotPrimitive = Triangles | ||
89 | , slotPrograms = [ 0 ] | ||
90 | } | ||
91 | ] | ||
92 | , streams = [] | ||
93 | , commands = | ||
94 | [ SetRenderTarget 0 | ||
95 | , ClearRenderTarget | ||
96 | [ ClearImage | ||
97 | { imageSemantic = Color , clearValue = VV4I (V4 0 0 0 0) } | ||
98 | ] | ||
99 | , SetProgram 0 | ||
100 | , SetRasterContext | ||
101 | (TriangleCtx (CullFront CCW) PolygonFill NoOffset LastVertex) | ||
102 | , SetAccumulationContext | ||
103 | AccumulationContext | ||
104 | { accViewportName = Nothing | ||
105 | , accOperations = | ||
106 | [ ColorOp NoBlending (VV4B (V4 True True True True)) ] | ||
107 | } | ||
108 | , RenderSlot 0 | ||
109 | ] | ||
110 | } \ No newline at end of file | ||