summaryrefslogtreecommitdiff
path: root/testdata/editor-examples/LambdaCube2.out
blob: c3fe8ce7ffaa837461c63f8dcd365ae7f7544508 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Pipeline
  { info = "generated by lambdcube-compiler 0.5.0.0"
  , backend = OpenGL33
  , textures = []
  , samplers = []
  , targets =
      [ RenderTarget
          { renderTargets =
              [ TargetItem
                  { targetSemantic = Depth , targetRef = Just (Framebuffer Depth) }
              , TargetItem
                  { targetSemantic = Color , targetRef = Just (Framebuffer Color) }
              ]
          }
      ]
  , programs =
      [ Program
          { programUniforms =
              fromList [ ( "MVP" , M44F ) , ( "Time" , Float ) ]
          , programStreams =
              fromList
                [ ( "vi1" , Parameter { name = "position4" , ty = V4F } ) ]
          , programInTextures = fromList []
          , programOutput = [ Parameter { name = "f0" , ty = V4F } ]
          , vertexShader =
              """
              #version 330 core
              vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);}
              uniform mat4 MVP ;
              in vec4 vi1 ;
              smooth out vec4 vo1 ;
              void main() {
              gl_Position = ( ( MVP ) * ( vi1 ) ) * ( vec4 ( 0.5,0.5,0.5,1.0 ) );
              vo1 = vi1;
              }
              
              """
          , geometryShader = Nothing
          , fragmentShader =
              """
              #version 330 core
              vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);}
              uniform float Time ;
              smooth in vec4 vo1 ;
              out vec4 f0 ;
              void main() {
              if (!(( ( ( ( ( ( vo1 ).y ) + ( ( vo1 ).x ) ) + ( ( vo1 ).z ) ) > ( 1.0 ) ) || ( ( abs ( ( ( ( ( vo1 ).y ) - ( ( vo1 ).x ) ) + ( ( vo1 ).z ) ) - ( 1.0 ) ) ) > ( 0.25 ) ) ) && ( ( ( ( ( ( ( vo1 ).y ) + ( ( vo1 ).x ) ) - ( ( vo1 ).z ) ) > ( 1.0 ) ) || ( ( abs ( ( ( ( ( vo1 ).y ) + ( ( vo1 ).x ) ) + ( ( vo1 ).z ) ) - ( 1.0 ) ) ) > ( 0.25 ) ) ) && ( ( ( ( ( ( ( vo1 ).y ) - ( ( vo1 ).x ) ) - ( ( vo1 ).z ) ) > ( 1.0 ) ) || ( ( abs ( ( ( ( ( vo1 ).y ) + ( ( vo1 ).x ) ) - ( ( vo1 ).z ) ) - ( 1.0 ) ) ) > ( 0.25 ) ) ) && ( ( ( ( ( ( ( vo1 ).y ) - ( ( vo1 ).x ) ) + ( ( vo1 ).z ) ) > ( 1.0 ) ) || ( ( abs ( ( ( ( ( vo1 ).y ) - ( ( vo1 ).x ) ) - ( ( vo1 ).z ) ) - ( 1.0 ) ) ) > ( 0.25 ) ) ) && ( ( ( ( ( ( sin ( ( vo1 ) * ( 20.0 ) ) ).x ) * ( ( sin ( ( vo1 ) * ( 20.0 ) ) ).x ) ) + ( ( ( sin ( ( vo1 ) * ( 20.0 ) ) ).y ) * ( ( sin ( ( vo1 ) * ( 20.0 ) ) ).y ) ) ) + ( ( ( sin ( ( vo1 ) * ( 20.0 ) ) ).z ) * ( ( sin ( ( vo1 ) * ( 20.0 ) ) ).z ) ) ) > ( abs ( ( 3.0 ) * ( sin ( ( 1.0 ) * ( Time ) ) ) ) ) ) ) ) ))) discard;
              f0 = vo1;
              }
              
              """
          }
      ]
  , slots =
      [ Slot
          { slotName = "stream4"
          , slotStreams = fromList [ ( "position4" , V4F ) ]
          , slotUniforms = fromList [ ( "MVP" , M44F ) , ( "Time" , Float ) ]
          , slotPrimitive = Triangles
          , slotPrograms = [ 0 ]
          }
      ]
  , streams = []
  , commands =
      [ SetRenderTarget 0
      , ClearRenderTarget
          [ ClearImage { imageSemantic = Depth , clearValue = VFloat 1.0 }
          , ClearImage
              { imageSemantic = Color , clearValue = VV4F (V4 0.0 0.0 0.5 1.0) }
          ]
      , SetProgram 0
      , SetRasterContext
          (TriangleCtx CullNone PolygonFill NoOffset LastVertex)
      , SetAccumulationContext
          AccumulationContext
            { accViewportName = Nothing
            , accOperations =
                [ DepthOp Less True
                , ColorOp NoBlending (VV4B (V4 True True True True))
                ]
            }
      , RenderSlot 0
      ]
  }