diff options
39 files changed, 1465 insertions, 1314 deletions
diff --git a/src/LambdaCube/Compiler/CoreToIR.hs b/src/LambdaCube/Compiler/CoreToIR.hs index 17e2133d..ee8013ac 100644 --- a/src/LambdaCube/Compiler/CoreToIR.hs +++ b/src/LambdaCube/Compiler/CoreToIR.hs | |||
@@ -26,7 +26,7 @@ import qualified LambdaCube.IR as IR | |||
26 | import qualified LambdaCube.Linear as IR | 26 | import qualified LambdaCube.Linear as IR |
27 | 27 | ||
28 | import LambdaCube.Compiler.Pretty | 28 | import LambdaCube.Compiler.Pretty |
29 | import Text.PrettyPrint.Compact (nest) | 29 | import Text.PrettyPrint.Compact (nest, indent) |
30 | import LambdaCube.Compiler.Infer hiding (Con, Lam, Pi, TType, Var, ELit) | 30 | import LambdaCube.Compiler.Infer hiding (Con, Lam, Pi, TType, Var, ELit) |
31 | import qualified LambdaCube.Compiler.Infer as I | 31 | import qualified LambdaCube.Compiler.Infer as I |
32 | import LambdaCube.Compiler.Parser (up, Up (..)) | 32 | import LambdaCube.Compiler.Parser (up, Up (..)) |
@@ -196,9 +196,9 @@ getCommands e = case e of | |||
196 | , IR.programStreams = Map.fromList $ zip vertexInput $ map (uncurry IR.Parameter) input | 196 | , IR.programStreams = Map.fromList $ zip vertexInput $ map (uncurry IR.Parameter) input |
197 | , IR.programInTextures = snd <$> Map.filter ((\case UUniform{} -> False; _ -> True) . fst) pUniforms | 197 | , IR.programInTextures = snd <$> Map.filter ((\case UUniform{} -> False; _ -> True) . fst) pUniforms |
198 | , IR.programOutput = pure $ IR.Parameter "f0" IR.V4F -- TODO | 198 | , IR.programOutput = pure $ IR.Parameter "f0" IR.V4F -- TODO |
199 | , IR.vertexShader = unlines vertSrc | 199 | , IR.vertexShader = show vertSrc |
200 | , IR.geometryShader = mempty -- TODO | 200 | , IR.geometryShader = mempty -- TODO |
201 | , IR.fragmentShader = unlines fragSrc | 201 | , IR.fragmentShader = show fragSrc |
202 | } | 202 | } |
203 | pv <- gets IR.programs | 203 | pv <- gets IR.programs |
204 | modify (\s -> s {IR.programs = pv <> pure prg}) | 204 | modify (\s -> s {IR.programs = pv <> pure prg}) |
@@ -513,62 +513,59 @@ genGLSLs backend | |||
513 | (frag, tfrag) -- fragment shader | 513 | (frag, tfrag) -- fragment shader |
514 | ffilter -- fragment filter | 514 | ffilter -- fragment filter |
515 | = ( -- vertex input | 515 | = ( -- vertex input |
516 | vertIn | 516 | vertInNames |
517 | 517 | ||
518 | , -- uniforms | 518 | , -- uniforms |
519 | fmap (second fst) $ vertUniforms <> fragUniforms | 519 | fmap (second fst) $ vertUniforms <> fragUniforms |
520 | 520 | ||
521 | , -- vertex shader code | 521 | , -- vertex shader code |
522 | shaderHeader backend | 522 | shader backend $ |
523 | <> [unwords ["uniform", t, n, ";"] | (n, t) <- Map.toList $ snd . snd <$> vertUniforms] | 523 | [shaderDecl "uniform" (text t) (text n) | (n, t) <- Map.toList $ snd . snd <$> vertUniforms] |
524 | <> [unwords [inputDef backend, toGLSLType "3" t, n, ";"] | (n, t) <- zip vertIn verti] | 524 | <> [shaderDecl (inputDef backend) (toGLSLType "3" t) (text n) | (n, t) <- zip vertInNames vertIns] |
525 | <> [unwords $ varyingOut backend i ++ [t, n, ";"] | (n, (i, t)) <- zip vertOut'' vertOut] | 525 | <> [shaderDecl (varyingOut backend i) (text t) (text n) | (n, (i, t)) <- zip vertOutNames vertOuts] |
526 | <> ["void main() {"] | 526 | <> [mainFunc $ |
527 | <> [showNest $ text n <+> "=" </> x <> ";" | (n, x) <- zip vertOut''WithPosition vertGLSL] | 527 | [shaderLet (text n) x | (n, x) <- zip vertOutNamesWithPosition vertGLSL] |
528 | <> [showNest $ "gl_PointSize" <+> "=" </> x <> ";" | Just x <- [ptGLSL]] | 528 | <> [shaderLet "gl_PointSize" x | Just x <- [ptGLSL]] |
529 | <> ["}"] | 529 | ] |
530 | 530 | ||
531 | , -- fragment shader code | 531 | , -- fragment shader code |
532 | shaderHeader backend | 532 | shader backend $ |
533 | <> [unwords ["uniform", t, n, ";"] | (n, t) <- Map.toList $ snd . snd <$> fragUniforms] | 533 | [shaderDecl "uniform" (text t) (text n) | (n, t) <- Map.toList $ snd . snd <$> fragUniforms] |
534 | <> [unwords $ varyingIn backend i ++ [t, n, ";"] | (n, (i, t)) <- zip vertOut'' vertOut] | 534 | <> [shaderDecl (varyingIn backend i) (text t) (text n) | (n, (i, t)) <- zip vertOutNames vertOuts] |
535 | <> [unwords ["out", toGLSLType "4" tfrag,fragColorName backend,";"] | noUnit tfrag, backend == OpenGL33] | 535 | <> [shaderDecl "out" (toGLSLType "4" tfrag) (fragColorName backend) | noUnit tfrag, backend == OpenGL33] |
536 | <> ["void main() {"] | 536 | <> [mainFunc $ |
537 | <> [showNest $ "if" <+> parens ("!" <> parens filt) <+> "discard" <> ";" | Just filt <- [filtGLSL]] | 537 | [shaderStmt $ "if" <+> parens ("!" <> parens filt) <+> "discard" | Just filt <- [filtGLSL]] |
538 | <> [showNest $ text (fragColorName backend) <+> "=" <+> fromMaybe (text $ head vertOut'') fragGLSL <> ";" | noUnit tfrag] | 538 | <> [shaderLet (fragColorName backend) $ fromMaybe (text $ head vertOutNames) fragGLSL | noUnit tfrag] |
539 | <> ["}"] | 539 | ] |
540 | ) | 540 | ) |
541 | where | 541 | where |
542 | showNest = show . nest 4 | 542 | (vertIns, verts) = case vert of |
543 | 543 | Just (etaRed -> Just (vertIns, verts)) -> (vertIns, eTuple verts) | |
544 | (verti, verts) = case vert of | ||
545 | Just (etaRed -> Just (verti, verts)) -> (verti, eTuple verts) | ||
546 | Nothing -> ([], [mkTVar 0 tvert]) | 544 | Nothing -> ([], [mkTVar 0 tvert]) |
547 | 545 | ||
548 | freshTypeVars = map (("s" ++) . show) [0..] | 546 | freshTypeVars = map (("s" ++) . show) [0..] |
549 | 547 | ||
550 | (((vertGLSL, ptGLSL), vertUniforms), ((filtGLSL, fragGLSL), fragUniforms)) = flip evalState freshTypeVars $ (,) | 548 | (((vertGLSL, ptGLSL), vertUniforms), ((filtGLSL, fragGLSL), fragUniforms)) = flip evalState freshTypeVars $ (,) |
551 | <$> runWriterT ((,) | 549 | <$> runWriterT ((,) |
552 | <$> traverse (genGLSL' vertIn . (,) verti) verts | 550 | <$> traverse (genGLSL' vertInNames . (,) vertIns) verts |
553 | <*> traverse (genGLSL' vertOut''WithPosition . red) rp) | 551 | <*> traverse (genGLSL' vertOutNamesWithPosition . red) rp) |
554 | <*> runWriterT ((,) | 552 | <*> runWriterT ((,) |
555 | <$> traverse (genGLSL' (vertOut'') . red) ffilter | 553 | <$> traverse (genGLSL' vertOutNames . red) ffilter |
556 | <*> traverse (genGLSL' (vertOut'') . red) frag) | 554 | <*> traverse (genGLSL' vertOutNames . red) frag) |
557 | |||
558 | vertOut'' = map (("vo" ++) . show) [1..length vertOut] | ||
559 | vertOut''WithPosition = "gl_Position": vertOut'' | ||
560 | 555 | ||
561 | vertIn = map (("vi" ++) . show) [1..length verti] | 556 | vertInNames = map (("vi" ++) . show) [1..length vertIns] |
557 | vertOutNames = map (("vo" ++) . show) [1..length vertOuts] | ||
558 | vertOutNamesWithPosition = "gl_Position": vertOutNames | ||
562 | 559 | ||
563 | red (etaRed -> Just (ps, o)) = (ps, o) | 560 | red (etaRed -> Just (ps, o)) = (ps, o) |
564 | genGLSL' vertOut (ps, o) | 561 | genGLSL' vertOuts (ps, o) |
565 | | length ps == length vertOut = genGLSL (reverse vertOut) o | 562 | | length ps == length vertOuts = genGLSL (reverse vertOuts) o |
566 | | otherwise = error $ "makeSubst illegal input " ++ show ps ++ "\n" ++ show vertOut | 563 | | otherwise = error $ "makeSubst illegal input " ++ show ps ++ "\n" ++ show vertOuts |
567 | 564 | ||
568 | noUnit TTuple0 = False | 565 | noUnit TTuple0 = False |
569 | noUnit _ = True | 566 | noUnit _ = True |
570 | 567 | ||
571 | vertOut = zipWith go (eTuple ints) $ tail verts | 568 | vertOuts = zipWith go (eTuple ints) $ tail verts |
572 | where | 569 | where |
573 | go (A0 n) e = (interpName n, toGLSLType "3" $ tyOf e) | 570 | go (A0 n) e = (interpName n, toGLSLType "3" $ tyOf e) |
574 | 571 | ||
@@ -576,13 +573,22 @@ genGLSLs backend | |||
576 | interpName "Flat" = "flat" | 573 | interpName "Flat" = "flat" |
577 | interpName "NoPerspective" = "noperspective" | 574 | interpName "NoPerspective" = "noperspective" |
578 | 575 | ||
579 | shaderHeader WebGL1 = | 576 | shader WebGL1 xs = vcat $ |
580 | ["#version 100"] | 577 | ["#version 100"] |
581 | <> ["precision highp float;"] | 578 | <> ["precision highp float;"] |
582 | <> ["precision highp int;"] | 579 | <> ["precision highp int;"] |
583 | shaderHeader OpenGL33 = | 580 | <> xs |
581 | shader OpenGL33 xs = vcat $ | ||
584 | ["#version 330 core"] | 582 | ["#version 330 core"] |
585 | <> ["vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);}"] | 583 | <> [shaderFunc "vec4" "texture2D" ["sampler2D s", "vec2 uv"] [shaderReturn "texture(s,uv)"]] |
584 | <> xs | ||
585 | |||
586 | shaderFunc outtype name pars body = outtype <+> name <> tupled pars <+> "{" <$$> indent 4 (vcat body) <$$> "}" | ||
587 | mainFunc xs = shaderFunc "void" "main" [] xs | ||
588 | shaderStmt xs = nest 4 $ xs <> ";" | ||
589 | shaderReturn xs = shaderStmt $ "return" <+> xs | ||
590 | shaderLet a b = shaderStmt $ a <+> "=" </> b | ||
591 | shaderDecl a b c = shaderStmt $ a <+> b <+> c | ||
586 | 592 | ||
587 | fragColorName WebGL1 = "gl_FragColor" | 593 | fragColorName WebGL1 = "gl_FragColor" |
588 | fragColorName OpenGL33 = "f0" | 594 | fragColorName OpenGL33 = "f0" |
@@ -590,11 +596,11 @@ genGLSLs backend | |||
590 | inputDef WebGL1 = "attribute" | 596 | inputDef WebGL1 = "attribute" |
591 | inputDef OpenGL33 = "in" | 597 | inputDef OpenGL33 = "in" |
592 | 598 | ||
593 | varyingIn WebGL1 _ = ["varying"] | 599 | varyingIn WebGL1 _ = "varying" |
594 | varyingIn OpenGL33 i = [i, "in"] | 600 | varyingIn OpenGL33 i = text i <+> "in" |
595 | 601 | ||
596 | varyingOut WebGL1 _ = ["varying"] | 602 | varyingOut WebGL1 _ = "varying" |
597 | varyingOut OpenGL33 i = [i, "out"] | 603 | varyingOut OpenGL33 i = text i <+> "out" |
598 | 604 | ||
599 | eTuple (ETuple l) = l | 605 | eTuple (ETuple l) = l |
600 | eTuple x = [x] | 606 | eTuple x = [x] |
diff --git a/testdata/HyperbolicParaboloic.out b/testdata/HyperbolicParaboloic.out index 67b1a1f6..3697902a 100644 --- a/testdata/HyperbolicParaboloic.out +++ b/testdata/HyperbolicParaboloic.out | |||
@@ -25,31 +25,34 @@ Pipeline | |||
25 | , vertexShader = | 25 | , vertexShader = |
26 | """ | 26 | """ |
27 | #version 330 core | 27 | #version 330 core |
28 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 28 | vec4 texture2D(sampler2D s,vec2 uv) { |
29 | uniform mat4 MVP ; | 29 | return texture(s,uv); |
30 | uniform vec2 Mouse ; | 30 | } |
31 | in vec3 vi1 ; | 31 | uniform mat4 MVP; |
32 | smooth out vec4 vo1 ; | 32 | uniform vec2 Mouse; |
33 | in vec3 vi1; | ||
34 | smooth out vec4 vo1; | ||
33 | void main() { | 35 | void main() { |
34 | gl_Position = ((MVP) * (vec4 (((Mouse).y) * ((vi1).x) | 36 | gl_Position = ((MVP) * (vec4 |
35 | ,(((0.5) * ((Mouse).x)) * ((vi1).x)) * ((vi1).y) | 37 | (((Mouse).y) * ((vi1).x) |
36 | ,((Mouse).y) * ((vi1).y) | 38 | ,(((0.5) * ((Mouse).x)) * ((vi1).x)) * ((vi1).y) |
37 | ,1.0))) * (vec4 (0.1,0.1,0.1,1.0)); | 39 | ,((Mouse).y) * ((vi1).y) |
38 | vo1 = vec4 ((vi1).x,(vi1).y,(vi1).z,1.0); | 40 | ,1.0))) * (vec4 (0.1,0.1,0.1,1.0)); |
41 | vo1 = vec4 ((vi1).x,(vi1).y,(vi1).z,1.0); | ||
39 | } | 42 | } |
40 | |||
41 | """ | 43 | """ |
42 | , geometryShader = Nothing | 44 | , geometryShader = Nothing |
43 | , fragmentShader = | 45 | , fragmentShader = |
44 | """ | 46 | """ |
45 | #version 330 core | 47 | #version 330 core |
46 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 48 | vec4 texture2D(sampler2D s,vec2 uv) { |
47 | smooth in vec4 vo1 ; | 49 | return texture(s,uv); |
48 | out vec4 f0 ; | 50 | } |
51 | smooth in vec4 vo1; | ||
52 | out vec4 f0; | ||
49 | void main() { | 53 | void main() { |
50 | f0 = vo1; | 54 | f0 = vo1; |
51 | } | 55 | } |
52 | |||
53 | """ | 56 | """ |
54 | } | 57 | } |
55 | ] | 58 | ] |
diff --git a/testdata/Hyperboloid.out b/testdata/Hyperboloid.out index b56b5c60..ec08e25e 100644 --- a/testdata/Hyperboloid.out +++ b/testdata/Hyperboloid.out | |||
@@ -25,33 +25,36 @@ Pipeline | |||
25 | , vertexShader = | 25 | , vertexShader = |
26 | """ | 26 | """ |
27 | #version 330 core | 27 | #version 330 core |
28 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 28 | vec4 texture2D(sampler2D s,vec2 uv) { |
29 | uniform mat4 MVP ; | 29 | return texture(s,uv); |
30 | uniform vec2 Mouse ; | 30 | } |
31 | in vec3 vi1 ; | 31 | uniform mat4 MVP; |
32 | smooth out vec4 vo1 ; | 32 | uniform vec2 Mouse; |
33 | in vec3 vi1; | ||
34 | smooth out vec4 vo1; | ||
33 | void main() { | 35 | void main() { |
34 | gl_Position = ((MVP) * (vec4 (((2.0) * ((Mouse).y)) * (sin | 36 | gl_Position = ((MVP) * (vec4 |
35 | (((0.7) * ((vi1).x)) + (((Mouse).x) * ((vi1).y)))) | 37 | (((2.0) * ((Mouse).y)) * (sin |
36 | ,(vi1).y | 38 | (((0.7) * ((vi1).x)) + (((Mouse).x) * ((vi1).y)))) |
37 | ,((2.0) * ((Mouse).y)) * (cos | 39 | ,(vi1).y |
38 | (((0.7) * ((vi1).x)) + (((Mouse).x) * ((vi1).y)))) | 40 | ,((2.0) * ((Mouse).y)) * (cos |
39 | ,1.0))) * (vec4 (0.1,0.1,0.1,1.0)); | 41 | (((0.7) * ((vi1).x)) + (((Mouse).x) * ((vi1).y)))) |
40 | vo1 = vec4 ((vi1).x,(vi1).y,(vi1).z,1.0); | 42 | ,1.0))) * (vec4 (0.1,0.1,0.1,1.0)); |
43 | vo1 = vec4 ((vi1).x,(vi1).y,(vi1).z,1.0); | ||
41 | } | 44 | } |
42 | |||
43 | """ | 45 | """ |
44 | , geometryShader = Nothing | 46 | , geometryShader = Nothing |
45 | , fragmentShader = | 47 | , fragmentShader = |
46 | """ | 48 | """ |
47 | #version 330 core | 49 | #version 330 core |
48 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 50 | vec4 texture2D(sampler2D s,vec2 uv) { |
49 | smooth in vec4 vo1 ; | 51 | return texture(s,uv); |
50 | out vec4 f0 ; | 52 | } |
53 | smooth in vec4 vo1; | ||
54 | out vec4 f0; | ||
51 | void main() { | 55 | void main() { |
52 | f0 = vo1; | 56 | f0 = vo1; |
53 | } | 57 | } |
54 | |||
55 | """ | 58 | """ |
56 | } | 59 | } |
57 | ] | 60 | ] |
diff --git a/testdata/NewStyle.out b/testdata/NewStyle.out index 70e7cdc5..34940a54 100644 --- a/testdata/NewStyle.out +++ b/testdata/NewStyle.out | |||
@@ -24,27 +24,29 @@ Pipeline | |||
24 | , vertexShader = | 24 | , vertexShader = |
25 | """ | 25 | """ |
26 | #version 330 core | 26 | #version 330 core |
27 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 27 | vec4 texture2D(sampler2D s,vec2 uv) { |
28 | uniform mat4 MVP ; | 28 | return texture(s,uv); |
29 | in vec4 vi1 ; | 29 | } |
30 | smooth out vec4 vo1 ; | 30 | uniform mat4 MVP; |
31 | in vec4 vi1; | ||
32 | smooth out vec4 vo1; | ||
31 | void main() { | 33 | void main() { |
32 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); | 34 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); |
33 | vo1 = vi1; | 35 | vo1 = vi1; |
34 | } | 36 | } |
35 | |||
36 | """ | 37 | """ |
37 | , geometryShader = Nothing | 38 | , geometryShader = Nothing |
38 | , fragmentShader = | 39 | , fragmentShader = |
39 | """ | 40 | """ |
40 | #version 330 core | 41 | #version 330 core |
41 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 42 | vec4 texture2D(sampler2D s,vec2 uv) { |
42 | smooth in vec4 vo1 ; | 43 | return texture(s,uv); |
43 | out vec4 f0 ; | 44 | } |
45 | smooth in vec4 vo1; | ||
46 | out vec4 f0; | ||
44 | void main() { | 47 | void main() { |
45 | f0 = vo1; | 48 | f0 = vo1; |
46 | } | 49 | } |
47 | |||
48 | """ | 50 | """ |
49 | } | 51 | } |
50 | ] | 52 | ] |
diff --git a/testdata/PrimReduce.out b/testdata/PrimReduce.out index b25cdf42..e984694d 100644 --- a/testdata/PrimReduce.out +++ b/testdata/PrimReduce.out | |||
@@ -22,27 +22,29 @@ Pipeline | |||
22 | , vertexShader = | 22 | , vertexShader = |
23 | """ | 23 | """ |
24 | #version 330 core | 24 | #version 330 core |
25 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 25 | vec4 texture2D(sampler2D s,vec2 uv) { |
26 | in vec4 vi1 ; | 26 | return texture(s,uv); |
27 | } | ||
28 | in vec4 vi1; | ||
27 | void main() { | 29 | void main() { |
28 | gl_Position = ((mat4 | 30 | gl_Position = ((mat4 |
29 | (vec4 (cos (3.0),(0.0) - (sin (3.0)),0.0,0.0) | 31 | (vec4 (cos (3.0),(0.0) - (sin (3.0)),0.0,0.0) |
30 | ,vec4 (sin (3.0),cos (3.0),0.0,0.0) | 32 | ,vec4 (sin (3.0),cos (3.0),0.0,0.0) |
31 | ,vec4 (0.0,0.0,1.0,0.0) | 33 | ,vec4 (0.0,0.0,1.0,0.0) |
32 | ,vec4 (0.0,0.0,0.0,1.0))) * (vi1)) * (vec4 (0.1,0.1,0.1,1.0)); | 34 | ,vec4 (0.0,0.0,0.0,1.0))) * (vi1)) * (vec4 (0.1,0.1,0.1,1.0)); |
33 | } | 35 | } |
34 | |||
35 | """ | 36 | """ |
36 | , geometryShader = Nothing | 37 | , geometryShader = Nothing |
37 | , fragmentShader = | 38 | , fragmentShader = |
38 | """ | 39 | """ |
39 | #version 330 core | 40 | #version 330 core |
40 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 41 | vec4 texture2D(sampler2D s,vec2 uv) { |
41 | out vec4 f0 ; | 42 | return texture(s,uv); |
43 | } | ||
44 | out vec4 f0; | ||
42 | void main() { | 45 | void main() { |
43 | f0 = vec4 (0.0,0.0,1.0,1.0); | 46 | f0 = vec4 (0.0,0.0,1.0,1.0); |
44 | } | 47 | } |
45 | |||
46 | """ | 48 | """ |
47 | } | 49 | } |
48 | ] | 50 | ] |
diff --git a/testdata/Spiral.out b/testdata/Spiral.out index 74973803..8bf07994 100644 --- a/testdata/Spiral.out +++ b/testdata/Spiral.out | |||
@@ -25,34 +25,36 @@ Pipeline | |||
25 | , vertexShader = | 25 | , vertexShader = |
26 | """ | 26 | """ |
27 | #version 330 core | 27 | #version 330 core |
28 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 28 | vec4 texture2D(sampler2D s,vec2 uv) { |
29 | uniform mat4 MVP ; | 29 | return texture(s,uv); |
30 | uniform vec2 Mouse ; | 30 | } |
31 | in vec3 vi1 ; | 31 | uniform mat4 MVP; |
32 | smooth out vec4 vo1 ; | 32 | uniform vec2 Mouse; |
33 | in vec3 vi1; | ||
34 | smooth out vec4 vo1; | ||
33 | void main() { | 35 | void main() { |
34 | gl_Position = ((MVP) * (vec4 | 36 | gl_Position = ((MVP) * (vec4 |
35 | ((exp ((((Mouse).x) - (0.5)) * ((vi1).x))) * (sin | 37 | ((exp ((((Mouse).x) - (0.5)) * ((vi1).x))) * (sin |
36 | ((0.9) * ((vi1).x))) | 38 | ((0.9) * ((vi1).x))) |
37 | ,(exp ((((Mouse).x) - (0.5)) * ((vi1).x))) * (cos | 39 | ,(exp ((((Mouse).x) - (0.5)) * ((vi1).x))) * (cos |
38 | ((0.9) * ((vi1).x))) | 40 | ((0.9) * ((vi1).x))) |
39 | ,((Mouse).y) * ((0.9) * ((vi1).x)) | 41 | ,((Mouse).y) * ((0.9) * ((vi1).x)) |
40 | ,1.0))) * (vec4 (0.5,0.5,0.5,1.0)); | 42 | ,1.0))) * (vec4 (0.5,0.5,0.5,1.0)); |
41 | vo1 = vec4 ((vi1).x,(vi1).y,(vi1).z,1.0); | 43 | vo1 = vec4 ((vi1).x,(vi1).y,(vi1).z,1.0); |
42 | } | 44 | } |
43 | |||
44 | """ | 45 | """ |
45 | , geometryShader = Nothing | 46 | , geometryShader = Nothing |
46 | , fragmentShader = | 47 | , fragmentShader = |
47 | """ | 48 | """ |
48 | #version 330 core | 49 | #version 330 core |
49 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 50 | vec4 texture2D(sampler2D s,vec2 uv) { |
50 | smooth in vec4 vo1 ; | 51 | return texture(s,uv); |
51 | out vec4 f0 ; | 52 | } |
53 | smooth in vec4 vo1; | ||
54 | out vec4 f0; | ||
52 | void main() { | 55 | void main() { |
53 | f0 = vo1; | 56 | f0 = vo1; |
54 | } | 57 | } |
55 | |||
56 | """ | 58 | """ |
57 | } | 59 | } |
58 | ] | 60 | ] |
diff --git a/testdata/editor-examples/Cube.out b/testdata/editor-examples/Cube.out index 7c4593ef..a0fb077f 100644 --- a/testdata/editor-examples/Cube.out +++ b/testdata/editor-examples/Cube.out | |||
@@ -24,27 +24,29 @@ Pipeline | |||
24 | , vertexShader = | 24 | , vertexShader = |
25 | """ | 25 | """ |
26 | #version 330 core | 26 | #version 330 core |
27 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 27 | vec4 texture2D(sampler2D s,vec2 uv) { |
28 | uniform mat4 MVP ; | 28 | return texture(s,uv); |
29 | in vec4 vi1 ; | 29 | } |
30 | smooth out vec4 vo1 ; | 30 | uniform mat4 MVP; |
31 | in vec4 vi1; | ||
32 | smooth out vec4 vo1; | ||
31 | void main() { | 33 | void main() { |
32 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); | 34 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); |
33 | vo1 = vi1; | 35 | vo1 = vi1; |
34 | } | 36 | } |
35 | |||
36 | """ | 37 | """ |
37 | , geometryShader = Nothing | 38 | , geometryShader = Nothing |
38 | , fragmentShader = | 39 | , fragmentShader = |
39 | """ | 40 | """ |
40 | #version 330 core | 41 | #version 330 core |
41 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 42 | vec4 texture2D(sampler2D s,vec2 uv) { |
42 | smooth in vec4 vo1 ; | 43 | return texture(s,uv); |
43 | out vec4 f0 ; | 44 | } |
45 | smooth in vec4 vo1; | ||
46 | out vec4 f0; | ||
44 | void main() { | 47 | void main() { |
45 | f0 = vo1; | 48 | f0 = vo1; |
46 | } | 49 | } |
47 | |||
48 | """ | 50 | """ |
49 | } | 51 | } |
50 | ] | 52 | ] |
diff --git a/testdata/editor-examples/Heartbeat.out b/testdata/editor-examples/Heartbeat.out index 6cfc3728..99d469b1 100644 --- a/testdata/editor-examples/Heartbeat.out +++ b/testdata/editor-examples/Heartbeat.out | |||
@@ -79,49 +79,52 @@ Pipeline | |||
79 | , vertexShader = | 79 | , vertexShader = |
80 | """ | 80 | """ |
81 | #version 330 core | 81 | #version 330 core |
82 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 82 | vec4 texture2D(sampler2D s,vec2 uv) { |
83 | in vec4 vi1 ; | 83 | return texture(s,uv); |
84 | in vec2 vi2 ; | 84 | } |
85 | smooth out vec2 vo1 ; | 85 | in vec4 vi1; |
86 | in vec2 vi2; | ||
87 | smooth out vec2 vo1; | ||
86 | void main() { | 88 | void main() { |
87 | gl_Position = (vi1) * (vec4 (1.0,1.0,1.0,1.0)); | 89 | gl_Position = (vi1) * (vec4 (1.0,1.0,1.0,1.0)); |
88 | vo1 = vec2 ((vi2).x,(1.0) - ((vi2).y)); | 90 | vo1 = vec2 ((vi2).x,(1.0) - ((vi2).y)); |
89 | } | 91 | } |
90 | |||
91 | """ | 92 | """ |
92 | , geometryShader = Nothing | 93 | , geometryShader = Nothing |
93 | , fragmentShader = | 94 | , fragmentShader = |
94 | """ | 95 | """ |
95 | #version 330 core | 96 | #version 330 core |
96 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 97 | vec4 texture2D(sampler2D s,vec2 uv) { |
97 | uniform float Time ; | 98 | return texture(s,uv); |
98 | smooth in vec2 vo1 ; | 99 | } |
99 | out vec4 f0 ; | 100 | uniform float Time; |
101 | smooth in vec2 vo1; | ||
102 | out vec4 f0; | ||
100 | void main() { | 103 | void main() { |
101 | f0 = ((((((vo1).x) - (0.85)) * (((vo1).x) - (0.85))) + ((((vo1).y) - (0.85)) * (((vo1).y) - (0.85)))) + ((5.0e-4) * (sin | 104 | f0 = |
102 | (((3.0) * (atan | 105 | ((((((vo1).x) - (0.85)) * (((vo1).x) - (0.85))) + ((((vo1).y) - (0.85)) * (((vo1).y) - (0.85)))) + ((5.0e-4) * (sin |
103 | (((vo1).x) - (0.85) | 106 | (((3.0) * (atan |
104 | ,((vo1).y) - (0.85)))) + ((15.0) * (Time)))))) < ((5.0e-3) * (abs | 107 | (((vo1).x) - (0.85) |
105 | ((sin ((Time) * (4.0))) - (0.37)))) ? vec4 | 108 | ,((vo1).y) - (0.85)))) + ((15.0) * (Time)))))) < ((5.0e-3) * (abs |
106 | (0.0 | 109 | ((sin ((Time) * (4.0))) - (0.37)))) ? vec4 |
107 | ,0.0 | 110 | (0.0 |
108 | ,0.5 | 111 | ,0.0 |
109 | ,1.0) : ((((((vo1).x) - (0.85)) * (((vo1).x) - (0.85))) + ((((vo1).y) - (0.85)) * (((vo1).y) - (0.85)))) + ((2.0e-3) * (sin | 112 | ,0.5 |
110 | (((5.0) * (atan | 113 | ,1.0) : ((((((vo1).x) - (0.85)) * (((vo1).x) - (0.85))) + ((((vo1).y) - (0.85)) * (((vo1).y) - (0.85)))) + ((2.0e-3) * (sin |
111 | (((vo1).x) - (0.85) | 114 | (((5.0) * (atan |
112 | ,((vo1).y) - (0.85)))) - ((5.0) * (Time)))))) < ((2.0e-2) * (abs | 115 | (((vo1).x) - (0.85) |
113 | ((sin ((Time) * (4.0))) - (0.37)))) ? vec4 | 116 | ,((vo1).y) - (0.85)))) - ((5.0) * (Time)))))) < ((2.0e-2) * (abs |
114 | (0.0 | 117 | ((sin ((Time) * (4.0))) - (0.37)))) ? vec4 |
115 | ,0.0 | 118 | (0.0 |
116 | ,1.0 | 119 | ,0.0 |
117 | ,1.0) : ((((((vo1).x) - (0.85)) * (((vo1).x) - (0.85))) + ((((vo1).y) - (0.85)) * (((vo1).y) - (0.85)))) + ((2.0e-3) * (sin | 120 | ,1.0 |
118 | (((7.0) * (atan | 121 | ,1.0) : ((((((vo1).x) - (0.85)) * (((vo1).x) - (0.85))) + ((((vo1).y) - (0.85)) * (((vo1).y) - (0.85)))) + ((2.0e-3) * (sin |
119 | (((vo1).x) - (0.85) | 122 | (((7.0) * (atan |
120 | ,((vo1).y) - (0.85)))) + ((3.0) * (Time)))))) < ((5.0e-2) * (abs | 123 | (((vo1).x) - (0.85) |
121 | ((sin ((Time) * (4.0))) - (0.37)))) ? vec4 | 124 | ,((vo1).y) - (0.85)))) + ((3.0) * (Time)))))) < ((5.0e-2) * (abs |
122 | (1.0,1.0,1.0,1.0) : vec4 (1.0,1.0,0.0,1.0); | 125 | ((sin ((Time) * (4.0))) - (0.37)))) ? vec4 |
126 | (1.0,1.0,1.0,1.0) : vec4 (1.0,1.0,0.0,1.0); | ||
123 | } | 127 | } |
124 | |||
125 | """ | 128 | """ |
126 | } | 129 | } |
127 | , Program | 130 | , Program |
@@ -136,29 +139,31 @@ Pipeline | |||
136 | , vertexShader = | 139 | , vertexShader = |
137 | """ | 140 | """ |
138 | #version 330 core | 141 | #version 330 core |
139 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 142 | vec4 texture2D(sampler2D s,vec2 uv) { |
140 | uniform mat4 MVP ; | 143 | return texture(s,uv); |
141 | in vec4 vi1 ; | 144 | } |
142 | in vec2 vi2 ; | 145 | uniform mat4 MVP; |
143 | smooth out vec2 vo1 ; | 146 | in vec4 vi1; |
147 | in vec2 vi2; | ||
148 | smooth out vec2 vo1; | ||
144 | void main() { | 149 | void main() { |
145 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); | 150 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); |
146 | vo1 = vi2; | 151 | vo1 = vi2; |
147 | } | 152 | } |
148 | |||
149 | """ | 153 | """ |
150 | , geometryShader = Nothing | 154 | , geometryShader = Nothing |
151 | , fragmentShader = | 155 | , fragmentShader = |
152 | """ | 156 | """ |
153 | #version 330 core | 157 | #version 330 core |
154 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 158 | vec4 texture2D(sampler2D s,vec2 uv) { |
155 | uniform sampler2D s0 ; | 159 | return texture(s,uv); |
156 | smooth in vec2 vo1 ; | 160 | } |
157 | out vec4 f0 ; | 161 | uniform sampler2D s0; |
162 | smooth in vec2 vo1; | ||
163 | out vec4 f0; | ||
158 | void main() { | 164 | void main() { |
159 | f0 = texture2D (s0,vo1); | 165 | f0 = texture2D (s0,vo1); |
160 | } | 166 | } |
161 | |||
162 | """ | 167 | """ |
163 | } | 168 | } |
164 | ] | 169 | ] |
diff --git a/testdata/editor-examples/LambdaCube.out b/testdata/editor-examples/LambdaCube.out index 1211e5bd..1e68a1ea 100644 --- a/testdata/editor-examples/LambdaCube.out +++ b/testdata/editor-examples/LambdaCube.out | |||
@@ -24,86 +24,88 @@ Pipeline | |||
24 | , vertexShader = | 24 | , vertexShader = |
25 | """ | 25 | """ |
26 | #version 330 core | 26 | #version 330 core |
27 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 27 | vec4 texture2D(sampler2D s,vec2 uv) { |
28 | uniform float Time ; | 28 | return texture(s,uv); |
29 | in vec4 vi1 ; | 29 | } |
30 | smooth out vec4 vo1 ; | 30 | uniform float Time; |
31 | in vec4 vi1; | ||
32 | smooth out vec4 vo1; | ||
31 | void main() { | 33 | void main() { |
32 | gl_Position = ((mat4 | 34 | gl_Position = ((mat4 |
33 | (vec4 (cos ((4.1) + ((((fract ((Time) * (0.2))) * (fract | 35 | (vec4 (cos ((4.1) + ((((fract ((Time) * (0.2))) * (fract |
34 | ((Time) * (0.2)))) * ((3.0) - ((2.0) * (fract | 36 | ((Time) * (0.2)))) * ((3.0) - ((2.0) * (fract |
35 | ((Time) * (0.2)))))) * (6.28318530718))) | 37 | ((Time) * (0.2)))))) * (6.28318530718))) |
36 | ,0.0 | 38 | ,0.0 |
37 | ,(0.0) - (sin ((4.1) + ((((fract ((Time) * (0.2))) * (fract | 39 | ,(0.0) - (sin ((4.1) + ((((fract ((Time) * (0.2))) * (fract |
38 | ((Time) * (0.2)))) * ((3.0) - ((2.0) * (fract | 40 | ((Time) * (0.2)))) * ((3.0) - ((2.0) * (fract |
39 | ((Time) * (0.2)))))) * (6.28318530718)))) | 41 | ((Time) * (0.2)))))) * (6.28318530718)))) |
40 | ,0.0) | 42 | ,0.0) |
41 | ,vec4 (0.0,1.0,0.0,0.0) | 43 | ,vec4 (0.0,1.0,0.0,0.0) |
42 | ,vec4 (sin ((4.1) + ((((fract ((Time) * (0.2))) * (fract | 44 | ,vec4 (sin ((4.1) + ((((fract ((Time) * (0.2))) * (fract |
43 | ((Time) * (0.2)))) * ((3.0) - ((2.0) * (fract | 45 | ((Time) * (0.2)))) * ((3.0) - ((2.0) * (fract |
44 | ((Time) * (0.2)))))) * (6.28318530718))) | 46 | ((Time) * (0.2)))))) * (6.28318530718))) |
45 | ,0.0 | 47 | ,0.0 |
46 | ,cos ((4.1) + ((((fract ((Time) * (0.2))) * (fract | 48 | ,cos ((4.1) + ((((fract ((Time) * (0.2))) * (fract |
47 | ((Time) * (0.2)))) * ((3.0) - ((2.0) * (fract | 49 | ((Time) * (0.2)))) * ((3.0) - ((2.0) * (fract |
48 | ((Time) * (0.2)))))) * (6.28318530718))) | 50 | ((Time) * (0.2)))))) * (6.28318530718))) |
49 | ,0.0) | 51 | ,0.0) |
50 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 | 52 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 |
51 | (vec4 (cos (2.35619449017),sin (2.35619449017),0.0,0.0) | 53 | (vec4 (cos (2.35619449017),sin (2.35619449017),0.0,0.0) |
52 | ,vec4 | 54 | ,vec4 |
53 | ((0.0) - (sin (2.35619449017)),cos (2.35619449017),0.0,0.0) | 55 | ((0.0) - (sin (2.35619449017)),cos (2.35619449017),0.0,0.0) |
54 | ,vec4 (0.0,0.0,1.0,0.0) | 56 | ,vec4 (0.0,0.0,1.0,0.0) |
55 | ,vec4 (0.0,0.0,0.0,1.0))) * (vi1))) * (vec4 | 57 | ,vec4 (0.0,0.0,0.0,1.0))) * (vi1))) * (vec4 |
56 | ((0.2) + ((abs ((0.5) - (((fract ((Time) * (0.2))) * (fract | 58 | ((0.2) + ((abs ((0.5) - (((fract ((Time) * (0.2))) * (fract |
57 | ((Time) * (0.2)))) * ((3.0) - ((2.0) * (fract | 59 | ((Time) * (0.2)))) * ((3.0) - ((2.0) * (fract |
58 | ((Time) * (0.2)))))))) * (0.6)) | 60 | ((Time) * (0.2)))))))) * (0.6)) |
59 | ,(0.2) + ((abs ((0.5) - (((fract ((Time) * (0.2))) * (fract | 61 | ,(0.2) + ((abs ((0.5) - (((fract ((Time) * (0.2))) * (fract |
60 | ((Time) * (0.2)))) * ((3.0) - ((2.0) * (fract | 62 | ((Time) * (0.2)))) * ((3.0) - ((2.0) * (fract |
61 | ((Time) * (0.2)))))))) * (0.6)) | 63 | ((Time) * (0.2)))))))) * (0.6)) |
62 | ,(0.2) + ((abs ((0.5) - (((fract ((Time) * (0.2))) * (fract | 64 | ,(0.2) + ((abs ((0.5) - (((fract ((Time) * (0.2))) * (fract |
63 | ((Time) * (0.2)))) * ((3.0) - ((2.0) * (fract | 65 | ((Time) * (0.2)))) * ((3.0) - ((2.0) * (fract |
64 | ((Time) * (0.2)))))))) * (0.6)) | 66 | ((Time) * (0.2)))))))) * (0.6)) |
65 | ,1.0)); | 67 | ,1.0)); |
66 | vo1 = vi1; | 68 | vo1 = vi1; |
67 | } | 69 | } |
68 | |||
69 | """ | 70 | """ |
70 | , geometryShader = Nothing | 71 | , geometryShader = Nothing |
71 | , fragmentShader = | 72 | , fragmentShader = |
72 | """ | 73 | """ |
73 | #version 330 core | 74 | #version 330 core |
74 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 75 | vec4 texture2D(sampler2D s,vec2 uv) { |
75 | smooth in vec4 vo1 ; | 76 | return texture(s,uv); |
76 | out vec4 f0 ; | 77 | } |
78 | smooth in vec4 vo1; | ||
79 | out vec4 f0; | ||
77 | void main() { | 80 | void main() { |
78 | f0 = (abs ((vo1).x)) > (0.99999) ? vec4 | 81 | f0 = (abs ((vo1).x)) > (0.99999) ? vec4 |
79 | (((((((vo1).yz) * (sign | 82 | (((((((vo1).yz) * (sign |
80 | ((vo1).x))) * (0.5)) + (0.5)).x) * ((((((vo1).yz) * (sign | 83 | ((vo1).x))) * (0.5)) + (0.5)).x) * ((((((vo1).yz) * (sign |
81 | ((vo1).x))) * (0.5)) + (0.5)).x) | 84 | ((vo1).x))) * (0.5)) + (0.5)).x) |
82 | ,1.0 | 85 | ,1.0 |
83 | ,((1.0) - ((((((vo1).yz) * (sign | 86 | ,((1.0) - ((((((vo1).yz) * (sign |
84 | ((vo1).x))) * (0.5)) + (0.5)).x)) * ((1.0) - ((((((vo1).yz) * (sign | 87 | ((vo1).x))) * (0.5)) + (0.5)).x)) * ((1.0) - ((((((vo1).yz) * (sign |
85 | ((vo1).x))) * (0.5)) + (0.5)).x)) | 88 | ((vo1).x))) * (0.5)) + (0.5)).x)) |
86 | ,((((((vo1).yz) * (sign | 89 | ,((((((vo1).yz) * (sign |
87 | ((vo1).x))) * (0.5)) + (0.5)).y) > (0.75) ? 0.0 : 1.0) : (abs | 90 | ((vo1).x))) * (0.5)) + (0.5)).y) > (0.75) ? 0.0 : 1.0) : (abs |
88 | ((vo1).y)) > (0.99999) ? vec4 | 91 | ((vo1).y)) > (0.99999) ? vec4 |
89 | ((dot (((((vo1).zx) * (sign ((vo1).y))) * (0.5)) + (0.5) | 92 | ((dot (((((vo1).zx) * (sign ((vo1).y))) * (0.5)) + (0.5) |
90 | ,vec2 (-0.5,0.5))) + (0.4) | 93 | ,vec2 (-0.5,0.5))) + (0.4) |
91 | ,1.0 | 94 | ,1.0 |
92 | ,0.0 | 95 | ,0.0 |
93 | ,((dot (((((vo1).zx) * (sign ((vo1).y))) * (0.5)) + (0.5) | 96 | ,((dot (((((vo1).zx) * (sign ((vo1).y))) * (0.5)) + (0.5) |
94 | ,vec2 (1.0,-1.0))) > (-0.25)) && ((dot | 97 | ,vec2 (1.0,-1.0))) > (-0.25)) && ((dot |
95 | (((((vo1).zx) * (sign ((vo1).y))) * (0.5)) + (0.5) | 98 | (((((vo1).zx) * (sign ((vo1).y))) * (0.5)) + (0.5) |
96 | ,vec2 (1.0,-1.0))) < (0.0)) ? 0.0 : 1.0) : (abs | 99 | ,vec2 (1.0,-1.0))) < (0.0)) ? 0.0 : 1.0) : (abs |
97 | ((vo1).z)) > (0.99999) ? vec4 | 100 | ((vo1).z)) > (0.99999) ? vec4 |
98 | (0.0 | 101 | (0.0 |
99 | ,1.0 | 102 | ,1.0 |
100 | ,(dot (((((vo1).xy) * (sign ((vo1).z))) * (0.5)) + (0.5) | 103 | ,(dot (((((vo1).xy) * (sign ((vo1).z))) * (0.5)) + (0.5) |
101 | ,vec2 (0.5,-0.5))) + (0.4) | 104 | ,vec2 (0.5,-0.5))) + (0.4) |
102 | ,((((((vo1).xy) * (sign | 105 | ,((((((vo1).xy) * (sign |
103 | ((vo1).z))) * (0.5)) + (0.5)).y) > (0.75) ? 0.0 : 1.0) : vec4 | 106 | ((vo1).z))) * (0.5)) + (0.5)).y) > (0.75) ? 0.0 : 1.0) : vec4 |
104 | (0.0,0.0,0.0,1.0); | 107 | (0.0,0.0,0.0,1.0); |
105 | } | 108 | } |
106 | |||
107 | """ | 109 | """ |
108 | } | 110 | } |
109 | ] | 111 | ] |
diff --git a/testdata/editor-examples/LambdaCube2.out b/testdata/editor-examples/LambdaCube2.out index a575bb72..ca24e47c 100644 --- a/testdata/editor-examples/LambdaCube2.out +++ b/testdata/editor-examples/LambdaCube2.out | |||
@@ -25,37 +25,39 @@ Pipeline | |||
25 | , vertexShader = | 25 | , vertexShader = |
26 | """ | 26 | """ |
27 | #version 330 core | 27 | #version 330 core |
28 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 28 | vec4 texture2D(sampler2D s,vec2 uv) { |
29 | uniform mat4 MVP ; | 29 | return texture(s,uv); |
30 | in vec4 vi1 ; | 30 | } |
31 | smooth out vec4 vo1 ; | 31 | uniform mat4 MVP; |
32 | in vec4 vi1; | ||
33 | smooth out vec4 vo1; | ||
32 | void main() { | 34 | void main() { |
33 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); | 35 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); |
34 | vo1 = vi1; | 36 | vo1 = vi1; |
35 | } | 37 | } |
36 | |||
37 | """ | 38 | """ |
38 | , geometryShader = Nothing | 39 | , geometryShader = Nothing |
39 | , fragmentShader = | 40 | , fragmentShader = |
40 | """ | 41 | """ |
41 | #version 330 core | 42 | #version 330 core |
42 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 43 | vec4 texture2D(sampler2D s,vec2 uv) { |
43 | uniform float Time ; | 44 | return texture(s,uv); |
44 | smooth in vec4 vo1 ; | 45 | } |
45 | out vec4 f0 ; | 46 | uniform float Time; |
47 | smooth in vec4 vo1; | ||
48 | out vec4 f0; | ||
46 | void main() { | 49 | void main() { |
47 | if (!(((((((vo1).y) + ((vo1).x)) + ((vo1).z)) > (1.0)) || ((abs | 50 | if (!(((((((vo1).y) + ((vo1).x)) + ((vo1).z)) > (1.0)) || ((abs |
48 | (((((vo1).y) - ((vo1).x)) + ((vo1).z)) - (1.0))) > (0.25))) && (((((((vo1).y) + ((vo1).x)) - ((vo1).z)) > (1.0)) || ((abs | 51 | (((((vo1).y) - ((vo1).x)) + ((vo1).z)) - (1.0))) > (0.25))) && (((((((vo1).y) + ((vo1).x)) - ((vo1).z)) > (1.0)) || ((abs |
49 | (((((vo1).y) + ((vo1).x)) + ((vo1).z)) - (1.0))) > (0.25))) && (((((((vo1).y) - ((vo1).x)) - ((vo1).z)) > (1.0)) || ((abs | 52 | (((((vo1).y) + ((vo1).x)) + ((vo1).z)) - (1.0))) > (0.25))) && (((((((vo1).y) - ((vo1).x)) - ((vo1).z)) > (1.0)) || ((abs |
50 | (((((vo1).y) + ((vo1).x)) - ((vo1).z)) - (1.0))) > (0.25))) && (((((((vo1).y) - ((vo1).x)) + ((vo1).z)) > (1.0)) || ((abs | 53 | (((((vo1).y) + ((vo1).x)) - ((vo1).z)) - (1.0))) > (0.25))) && (((((((vo1).y) - ((vo1).x)) + ((vo1).z)) > (1.0)) || ((abs |
51 | (((((vo1).y) - ((vo1).x)) - ((vo1).z)) - (1.0))) > (0.25))) && ((((((sin | 54 | (((((vo1).y) - ((vo1).x)) - ((vo1).z)) - (1.0))) > (0.25))) && ((((((sin |
52 | ((vo1) * (20.0))).x) * ((sin ((vo1) * (20.0))).x)) + (((sin | 55 | ((vo1) * (20.0))).x) * ((sin ((vo1) * (20.0))).x)) + (((sin |
53 | ((vo1) * (20.0))).y) * ((sin ((vo1) * (20.0))).y))) + (((sin | 56 | ((vo1) * (20.0))).y) * ((sin ((vo1) * (20.0))).y))) + (((sin |
54 | ((vo1) * (20.0))).z) * ((sin ((vo1) * (20.0))).z))) > (abs | 57 | ((vo1) * (20.0))).z) * ((sin ((vo1) * (20.0))).z))) > (abs |
55 | ((3.0) * (sin ((1.0) * (Time))))))))))) discard; | 58 | ((3.0) * (sin ((1.0) * (Time))))))))))) discard; |
56 | f0 = vo1; | 59 | f0 = vo1; |
57 | } | 60 | } |
58 | |||
59 | """ | 61 | """ |
60 | } | 62 | } |
61 | ] | 63 | ] |
diff --git a/testdata/editor-examples/Stripes.out b/testdata/editor-examples/Stripes.out index 547878a3..b3e3724a 100644 --- a/testdata/editor-examples/Stripes.out +++ b/testdata/editor-examples/Stripes.out | |||
@@ -24,37 +24,39 @@ Pipeline | |||
24 | , vertexShader = | 24 | , vertexShader = |
25 | """ | 25 | """ |
26 | #version 330 core | 26 | #version 330 core |
27 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 27 | vec4 texture2D(sampler2D s,vec2 uv) { |
28 | in vec4 vi1 ; | 28 | return texture(s,uv); |
29 | smooth out vec4 vo1 ; | 29 | } |
30 | in vec4 vi1; | ||
31 | smooth out vec4 vo1; | ||
30 | void main() { | 32 | void main() { |
31 | gl_Position = (vi1) * (vec4 (1.0,1.0,1.0,1.0)); | 33 | gl_Position = (vi1) * (vec4 (1.0,1.0,1.0,1.0)); |
32 | vo1 = vi1; | 34 | vo1 = vi1; |
33 | } | 35 | } |
34 | |||
35 | """ | 36 | """ |
36 | , geometryShader = Nothing | 37 | , geometryShader = Nothing |
37 | , fragmentShader = | 38 | , fragmentShader = |
38 | """ | 39 | """ |
39 | #version 330 core | 40 | #version 330 core |
40 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 41 | vec4 texture2D(sampler2D s,vec2 uv) { |
41 | uniform float Time ; | 42 | return texture(s,uv); |
42 | smooth in vec4 vo1 ; | 43 | } |
43 | out vec4 f0 ; | 44 | uniform float Time; |
45 | smooth in vec4 vo1; | ||
46 | out vec4 f0; | ||
44 | void main() { | 47 | void main() { |
45 | if (!((sin ((10.0) * (((mat4 | 48 | if (!((sin ((10.0) * (((mat4 |
46 | (vec4 (cos (Time),0.0,(0.0) - (sin (Time)),0.0) | 49 | (vec4 (cos (Time),0.0,(0.0) - (sin (Time)),0.0) |
47 | ,vec4 (0.0,1.0,0.0,0.0) | 50 | ,vec4 (0.0,1.0,0.0,0.0) |
48 | ,vec4 (sin (Time),0.0,cos (Time),0.0) | 51 | ,vec4 (sin (Time),0.0,cos (Time),0.0) |
49 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 | 52 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 |
50 | (vec4 (cos ((Time) * (1.0)),sin ((Time) * (1.0)),0.0,0.0) | 53 | (vec4 (cos ((Time) * (1.0)),sin ((Time) * (1.0)),0.0,0.0) |
51 | ,vec4 | 54 | ,vec4 |
52 | ((0.0) - (sin ((Time) * (1.0))),cos ((Time) * (1.0)),0.0,0.0) | 55 | ((0.0) - (sin ((Time) * (1.0))),cos ((Time) * (1.0)),0.0,0.0) |
53 | ,vec4 (0.0,0.0,1.0,0.0) | 56 | ,vec4 (0.0,0.0,1.0,0.0) |
54 | ,vec4 (0.0,0.0,0.0,1.0))) * (vo1))).x))) > (0.5))) discard; | 57 | ,vec4 (0.0,0.0,0.0,1.0))) * (vo1))).x))) > (0.5))) discard; |
55 | f0 = vec4 (0.0,0.0,0.0,1.0); | 58 | f0 = vec4 (0.0,0.0,0.0,1.0); |
56 | } | 59 | } |
57 | |||
58 | """ | 60 | """ |
59 | } | 61 | } |
60 | , Program | 62 | , Program |
@@ -67,40 +69,42 @@ Pipeline | |||
67 | , vertexShader = | 69 | , vertexShader = |
68 | """ | 70 | """ |
69 | #version 330 core | 71 | #version 330 core |
70 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 72 | vec4 texture2D(sampler2D s,vec2 uv) { |
71 | in vec4 vi1 ; | 73 | return texture(s,uv); |
72 | smooth out vec4 vo1 ; | 74 | } |
75 | in vec4 vi1; | ||
76 | smooth out vec4 vo1; | ||
73 | void main() { | 77 | void main() { |
74 | gl_Position = (vi1) * (vec4 (0.9,0.9,0.9,1.0)); | 78 | gl_Position = (vi1) * (vec4 (0.9,0.9,0.9,1.0)); |
75 | vo1 = vi1; | 79 | vo1 = vi1; |
76 | } | 80 | } |
77 | |||
78 | """ | 81 | """ |
79 | , geometryShader = Nothing | 82 | , geometryShader = Nothing |
80 | , fragmentShader = | 83 | , fragmentShader = |
81 | """ | 84 | """ |
82 | #version 330 core | 85 | #version 330 core |
83 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 86 | vec4 texture2D(sampler2D s,vec2 uv) { |
84 | uniform float Time ; | 87 | return texture(s,uv); |
85 | smooth in vec4 vo1 ; | 88 | } |
86 | out vec4 f0 ; | 89 | uniform float Time; |
90 | smooth in vec4 vo1; | ||
91 | out vec4 f0; | ||
87 | void main() { | 92 | void main() { |
88 | if (!((sin ((10.0) * (((mat4 | 93 | if (!((sin ((10.0) * (((mat4 |
89 | (vec4 (cos (Time),0.0,(0.0) - (sin (Time)),0.0) | 94 | (vec4 (cos (Time),0.0,(0.0) - (sin (Time)),0.0) |
90 | ,vec4 (0.0,1.0,0.0,0.0) | 95 | ,vec4 (0.0,1.0,0.0,0.0) |
91 | ,vec4 (sin (Time),0.0,cos (Time),0.0) | 96 | ,vec4 (sin (Time),0.0,cos (Time),0.0) |
92 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 | 97 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 |
93 | (vec4 (cos ((Time) * (0.9)),sin ((Time) * (0.9)),0.0,0.0) | 98 | (vec4 (cos ((Time) * (0.9)),sin ((Time) * (0.9)),0.0,0.0) |
94 | ,vec4 | 99 | ,vec4 |
95 | ((0.0) - (sin ((Time) * (0.9))),cos ((Time) * (0.9)),0.0,0.0) | 100 | ((0.0) - (sin ((Time) * (0.9))),cos ((Time) * (0.9)),0.0,0.0) |
96 | ,vec4 (0.0,0.0,1.0,0.0) | 101 | ,vec4 (0.0,0.0,1.0,0.0) |
97 | ,vec4 (0.0,0.0,0.0,1.0))) * (vo1))).x))) > (0.5))) discard; | 102 | ,vec4 (0.0,0.0,0.0,1.0))) * (vo1))).x))) > (0.5))) discard; |
98 | f0 = vec4 (9.999999999999998e-2 | 103 | f0 = vec4 (9.999999999999998e-2 |
99 | ,9.999999999999998e-2 | 104 | ,9.999999999999998e-2 |
100 | ,9.999999999999998e-2 | 105 | ,9.999999999999998e-2 |
101 | ,1.0); | 106 | ,1.0); |
102 | } | 107 | } |
103 | |||
104 | """ | 108 | """ |
105 | } | 109 | } |
106 | , Program | 110 | , Program |
@@ -113,40 +117,42 @@ Pipeline | |||
113 | , vertexShader = | 117 | , vertexShader = |
114 | """ | 118 | """ |
115 | #version 330 core | 119 | #version 330 core |
116 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 120 | vec4 texture2D(sampler2D s,vec2 uv) { |
117 | in vec4 vi1 ; | 121 | return texture(s,uv); |
118 | smooth out vec4 vo1 ; | 122 | } |
123 | in vec4 vi1; | ||
124 | smooth out vec4 vo1; | ||
119 | void main() { | 125 | void main() { |
120 | gl_Position = (vi1) * (vec4 (0.8,0.8,0.8,1.0)); | 126 | gl_Position = (vi1) * (vec4 (0.8,0.8,0.8,1.0)); |
121 | vo1 = vi1; | 127 | vo1 = vi1; |
122 | } | 128 | } |
123 | |||
124 | """ | 129 | """ |
125 | , geometryShader = Nothing | 130 | , geometryShader = Nothing |
126 | , fragmentShader = | 131 | , fragmentShader = |
127 | """ | 132 | """ |
128 | #version 330 core | 133 | #version 330 core |
129 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 134 | vec4 texture2D(sampler2D s,vec2 uv) { |
130 | uniform float Time ; | 135 | return texture(s,uv); |
131 | smooth in vec4 vo1 ; | 136 | } |
132 | out vec4 f0 ; | 137 | uniform float Time; |
138 | smooth in vec4 vo1; | ||
139 | out vec4 f0; | ||
133 | void main() { | 140 | void main() { |
134 | if (!((sin ((10.0) * (((mat4 | 141 | if (!((sin ((10.0) * (((mat4 |
135 | (vec4 (cos (Time),0.0,(0.0) - (sin (Time)),0.0) | 142 | (vec4 (cos (Time),0.0,(0.0) - (sin (Time)),0.0) |
136 | ,vec4 (0.0,1.0,0.0,0.0) | 143 | ,vec4 (0.0,1.0,0.0,0.0) |
137 | ,vec4 (sin (Time),0.0,cos (Time),0.0) | 144 | ,vec4 (sin (Time),0.0,cos (Time),0.0) |
138 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 | 145 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 |
139 | (vec4 (cos ((Time) * (0.8)),sin ((Time) * (0.8)),0.0,0.0) | 146 | (vec4 (cos ((Time) * (0.8)),sin ((Time) * (0.8)),0.0,0.0) |
140 | ,vec4 | 147 | ,vec4 |
141 | ((0.0) - (sin ((Time) * (0.8))),cos ((Time) * (0.8)),0.0,0.0) | 148 | ((0.0) - (sin ((Time) * (0.8))),cos ((Time) * (0.8)),0.0,0.0) |
142 | ,vec4 (0.0,0.0,1.0,0.0) | 149 | ,vec4 (0.0,0.0,1.0,0.0) |
143 | ,vec4 (0.0,0.0,0.0,1.0))) * (vo1))).x))) > (0.5))) discard; | 150 | ,vec4 (0.0,0.0,0.0,1.0))) * (vo1))).x))) > (0.5))) discard; |
144 | f0 = vec4 (0.19999999999999996 | 151 | f0 = vec4 (0.19999999999999996 |
145 | ,0.19999999999999996 | 152 | ,0.19999999999999996 |
146 | ,0.19999999999999996 | 153 | ,0.19999999999999996 |
147 | ,1.0); | 154 | ,1.0); |
148 | } | 155 | } |
149 | |||
150 | """ | 156 | """ |
151 | } | 157 | } |
152 | , Program | 158 | , Program |
@@ -159,40 +165,42 @@ Pipeline | |||
159 | , vertexShader = | 165 | , vertexShader = |
160 | """ | 166 | """ |
161 | #version 330 core | 167 | #version 330 core |
162 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 168 | vec4 texture2D(sampler2D s,vec2 uv) { |
163 | in vec4 vi1 ; | 169 | return texture(s,uv); |
164 | smooth out vec4 vo1 ; | 170 | } |
171 | in vec4 vi1; | ||
172 | smooth out vec4 vo1; | ||
165 | void main() { | 173 | void main() { |
166 | gl_Position = (vi1) * (vec4 (0.7,0.7,0.7,1.0)); | 174 | gl_Position = (vi1) * (vec4 (0.7,0.7,0.7,1.0)); |
167 | vo1 = vi1; | 175 | vo1 = vi1; |
168 | } | 176 | } |
169 | |||
170 | """ | 177 | """ |
171 | , geometryShader = Nothing | 178 | , geometryShader = Nothing |
172 | , fragmentShader = | 179 | , fragmentShader = |
173 | """ | 180 | """ |
174 | #version 330 core | 181 | #version 330 core |
175 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 182 | vec4 texture2D(sampler2D s,vec2 uv) { |
176 | uniform float Time ; | 183 | return texture(s,uv); |
177 | smooth in vec4 vo1 ; | 184 | } |
178 | out vec4 f0 ; | 185 | uniform float Time; |
186 | smooth in vec4 vo1; | ||
187 | out vec4 f0; | ||
179 | void main() { | 188 | void main() { |
180 | if (!((sin ((10.0) * (((mat4 | 189 | if (!((sin ((10.0) * (((mat4 |
181 | (vec4 (cos (Time),0.0,(0.0) - (sin (Time)),0.0) | 190 | (vec4 (cos (Time),0.0,(0.0) - (sin (Time)),0.0) |
182 | ,vec4 (0.0,1.0,0.0,0.0) | 191 | ,vec4 (0.0,1.0,0.0,0.0) |
183 | ,vec4 (sin (Time),0.0,cos (Time),0.0) | 192 | ,vec4 (sin (Time),0.0,cos (Time),0.0) |
184 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 | 193 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 |
185 | (vec4 (cos ((Time) * (0.7)),sin ((Time) * (0.7)),0.0,0.0) | 194 | (vec4 (cos ((Time) * (0.7)),sin ((Time) * (0.7)),0.0,0.0) |
186 | ,vec4 | 195 | ,vec4 |
187 | ((0.0) - (sin ((Time) * (0.7))),cos ((Time) * (0.7)),0.0,0.0) | 196 | ((0.0) - (sin ((Time) * (0.7))),cos ((Time) * (0.7)),0.0,0.0) |
188 | ,vec4 (0.0,0.0,1.0,0.0) | 197 | ,vec4 (0.0,0.0,1.0,0.0) |
189 | ,vec4 (0.0,0.0,0.0,1.0))) * (vo1))).x))) > (0.5))) discard; | 198 | ,vec4 (0.0,0.0,0.0,1.0))) * (vo1))).x))) > (0.5))) discard; |
190 | f0 = vec4 (0.30000000000000004 | 199 | f0 = vec4 (0.30000000000000004 |
191 | ,0.30000000000000004 | 200 | ,0.30000000000000004 |
192 | ,0.30000000000000004 | 201 | ,0.30000000000000004 |
193 | ,1.0); | 202 | ,1.0); |
194 | } | 203 | } |
195 | |||
196 | """ | 204 | """ |
197 | } | 205 | } |
198 | , Program | 206 | , Program |
@@ -205,37 +213,39 @@ Pipeline | |||
205 | , vertexShader = | 213 | , vertexShader = |
206 | """ | 214 | """ |
207 | #version 330 core | 215 | #version 330 core |
208 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 216 | vec4 texture2D(sampler2D s,vec2 uv) { |
209 | in vec4 vi1 ; | 217 | return texture(s,uv); |
210 | smooth out vec4 vo1 ; | 218 | } |
219 | in vec4 vi1; | ||
220 | smooth out vec4 vo1; | ||
211 | void main() { | 221 | void main() { |
212 | gl_Position = (vi1) * (vec4 (0.6,0.6,0.6,1.0)); | 222 | gl_Position = (vi1) * (vec4 (0.6,0.6,0.6,1.0)); |
213 | vo1 = vi1; | 223 | vo1 = vi1; |
214 | } | 224 | } |
215 | |||
216 | """ | 225 | """ |
217 | , geometryShader = Nothing | 226 | , geometryShader = Nothing |
218 | , fragmentShader = | 227 | , fragmentShader = |
219 | """ | 228 | """ |
220 | #version 330 core | 229 | #version 330 core |
221 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 230 | vec4 texture2D(sampler2D s,vec2 uv) { |
222 | uniform float Time ; | 231 | return texture(s,uv); |
223 | smooth in vec4 vo1 ; | 232 | } |
224 | out vec4 f0 ; | 233 | uniform float Time; |
234 | smooth in vec4 vo1; | ||
235 | out vec4 f0; | ||
225 | void main() { | 236 | void main() { |
226 | if (!((sin ((10.0) * (((mat4 | 237 | if (!((sin ((10.0) * (((mat4 |
227 | (vec4 (cos (Time),0.0,(0.0) - (sin (Time)),0.0) | 238 | (vec4 (cos (Time),0.0,(0.0) - (sin (Time)),0.0) |
228 | ,vec4 (0.0,1.0,0.0,0.0) | 239 | ,vec4 (0.0,1.0,0.0,0.0) |
229 | ,vec4 (sin (Time),0.0,cos (Time),0.0) | 240 | ,vec4 (sin (Time),0.0,cos (Time),0.0) |
230 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 | 241 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 |
231 | (vec4 (cos ((Time) * (0.6)),sin ((Time) * (0.6)),0.0,0.0) | 242 | (vec4 (cos ((Time) * (0.6)),sin ((Time) * (0.6)),0.0,0.0) |
232 | ,vec4 | 243 | ,vec4 |
233 | ((0.0) - (sin ((Time) * (0.6))),cos ((Time) * (0.6)),0.0,0.0) | 244 | ((0.0) - (sin ((Time) * (0.6))),cos ((Time) * (0.6)),0.0,0.0) |
234 | ,vec4 (0.0,0.0,1.0,0.0) | 245 | ,vec4 (0.0,0.0,1.0,0.0) |
235 | ,vec4 (0.0,0.0,0.0,1.0))) * (vo1))).x))) > (0.5))) discard; | 246 | ,vec4 (0.0,0.0,0.0,1.0))) * (vo1))).x))) > (0.5))) discard; |
236 | f0 = vec4 (0.4,0.4,0.4,1.0); | 247 | f0 = vec4 (0.4,0.4,0.4,1.0); |
237 | } | 248 | } |
238 | |||
239 | """ | 249 | """ |
240 | } | 250 | } |
241 | , Program | 251 | , Program |
@@ -248,37 +258,39 @@ Pipeline | |||
248 | , vertexShader = | 258 | , vertexShader = |
249 | """ | 259 | """ |
250 | #version 330 core | 260 | #version 330 core |
251 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 261 | vec4 texture2D(sampler2D s,vec2 uv) { |
252 | in vec4 vi1 ; | 262 | return texture(s,uv); |
253 | smooth out vec4 vo1 ; | 263 | } |
264 | in vec4 vi1; | ||
265 | smooth out vec4 vo1; | ||
254 | void main() { | 266 | void main() { |
255 | gl_Position = (vi1) * (vec4 (0.5,0.5,0.5,1.0)); | 267 | gl_Position = (vi1) * (vec4 (0.5,0.5,0.5,1.0)); |
256 | vo1 = vi1; | 268 | vo1 = vi1; |
257 | } | 269 | } |
258 | |||
259 | """ | 270 | """ |
260 | , geometryShader = Nothing | 271 | , geometryShader = Nothing |
261 | , fragmentShader = | 272 | , fragmentShader = |
262 | """ | 273 | """ |
263 | #version 330 core | 274 | #version 330 core |
264 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 275 | vec4 texture2D(sampler2D s,vec2 uv) { |
265 | uniform float Time ; | 276 | return texture(s,uv); |
266 | smooth in vec4 vo1 ; | 277 | } |
267 | out vec4 f0 ; | 278 | uniform float Time; |
279 | smooth in vec4 vo1; | ||
280 | out vec4 f0; | ||
268 | void main() { | 281 | void main() { |
269 | if (!((sin ((10.0) * (((mat4 | 282 | if (!((sin ((10.0) * (((mat4 |
270 | (vec4 (cos (Time),0.0,(0.0) - (sin (Time)),0.0) | 283 | (vec4 (cos (Time),0.0,(0.0) - (sin (Time)),0.0) |
271 | ,vec4 (0.0,1.0,0.0,0.0) | 284 | ,vec4 (0.0,1.0,0.0,0.0) |
272 | ,vec4 (sin (Time),0.0,cos (Time),0.0) | 285 | ,vec4 (sin (Time),0.0,cos (Time),0.0) |
273 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 | 286 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 |
274 | (vec4 (cos ((Time) * (0.5)),sin ((Time) * (0.5)),0.0,0.0) | 287 | (vec4 (cos ((Time) * (0.5)),sin ((Time) * (0.5)),0.0,0.0) |
275 | ,vec4 | 288 | ,vec4 |
276 | ((0.0) - (sin ((Time) * (0.5))),cos ((Time) * (0.5)),0.0,0.0) | 289 | ((0.0) - (sin ((Time) * (0.5))),cos ((Time) * (0.5)),0.0,0.0) |
277 | ,vec4 (0.0,0.0,1.0,0.0) | 290 | ,vec4 (0.0,0.0,1.0,0.0) |
278 | ,vec4 (0.0,0.0,0.0,1.0))) * (vo1))).x))) > (0.5))) discard; | 291 | ,vec4 (0.0,0.0,0.0,1.0))) * (vo1))).x))) > (0.5))) discard; |
279 | f0 = vec4 (0.5,0.5,0.5,1.0); | 292 | f0 = vec4 (0.5,0.5,0.5,1.0); |
280 | } | 293 | } |
281 | |||
282 | """ | 294 | """ |
283 | } | 295 | } |
284 | , Program | 296 | , Program |
@@ -291,37 +303,39 @@ Pipeline | |||
291 | , vertexShader = | 303 | , vertexShader = |
292 | """ | 304 | """ |
293 | #version 330 core | 305 | #version 330 core |
294 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 306 | vec4 texture2D(sampler2D s,vec2 uv) { |
295 | in vec4 vi1 ; | 307 | return texture(s,uv); |
296 | smooth out vec4 vo1 ; | 308 | } |
309 | in vec4 vi1; | ||
310 | smooth out vec4 vo1; | ||
297 | void main() { | 311 | void main() { |
298 | gl_Position = (vi1) * (vec4 (0.4,0.4,0.4,1.0)); | 312 | gl_Position = (vi1) * (vec4 (0.4,0.4,0.4,1.0)); |
299 | vo1 = vi1; | 313 | vo1 = vi1; |
300 | } | 314 | } |
301 | |||
302 | """ | 315 | """ |
303 | , geometryShader = Nothing | 316 | , geometryShader = Nothing |
304 | , fragmentShader = | 317 | , fragmentShader = |
305 | """ | 318 | """ |
306 | #version 330 core | 319 | #version 330 core |
307 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 320 | vec4 texture2D(sampler2D s,vec2 uv) { |
308 | uniform float Time ; | 321 | return texture(s,uv); |
309 | smooth in vec4 vo1 ; | 322 | } |
310 | out vec4 f0 ; | 323 | uniform float Time; |
324 | smooth in vec4 vo1; | ||
325 | out vec4 f0; | ||
311 | void main() { | 326 | void main() { |
312 | if (!((sin ((10.0) * (((mat4 | 327 | if (!((sin ((10.0) * (((mat4 |
313 | (vec4 (cos (Time),0.0,(0.0) - (sin (Time)),0.0) | 328 | (vec4 (cos (Time),0.0,(0.0) - (sin (Time)),0.0) |
314 | ,vec4 (0.0,1.0,0.0,0.0) | 329 | ,vec4 (0.0,1.0,0.0,0.0) |
315 | ,vec4 (sin (Time),0.0,cos (Time),0.0) | 330 | ,vec4 (sin (Time),0.0,cos (Time),0.0) |
316 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 | 331 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 |
317 | (vec4 (cos ((Time) * (0.4)),sin ((Time) * (0.4)),0.0,0.0) | 332 | (vec4 (cos ((Time) * (0.4)),sin ((Time) * (0.4)),0.0,0.0) |
318 | ,vec4 | 333 | ,vec4 |
319 | ((0.0) - (sin ((Time) * (0.4))),cos ((Time) * (0.4)),0.0,0.0) | 334 | ((0.0) - (sin ((Time) * (0.4))),cos ((Time) * (0.4)),0.0,0.0) |
320 | ,vec4 (0.0,0.0,1.0,0.0) | 335 | ,vec4 (0.0,0.0,1.0,0.0) |
321 | ,vec4 (0.0,0.0,0.0,1.0))) * (vo1))).x))) > (0.5))) discard; | 336 | ,vec4 (0.0,0.0,0.0,1.0))) * (vo1))).x))) > (0.5))) discard; |
322 | f0 = vec4 (0.6,0.6,0.6,1.0); | 337 | f0 = vec4 (0.6,0.6,0.6,1.0); |
323 | } | 338 | } |
324 | |||
325 | """ | 339 | """ |
326 | } | 340 | } |
327 | , Program | 341 | , Program |
@@ -334,37 +348,39 @@ Pipeline | |||
334 | , vertexShader = | 348 | , vertexShader = |
335 | """ | 349 | """ |
336 | #version 330 core | 350 | #version 330 core |
337 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 351 | vec4 texture2D(sampler2D s,vec2 uv) { |
338 | in vec4 vi1 ; | 352 | return texture(s,uv); |
339 | smooth out vec4 vo1 ; | 353 | } |
354 | in vec4 vi1; | ||
355 | smooth out vec4 vo1; | ||
340 | void main() { | 356 | void main() { |
341 | gl_Position = (vi1) * (vec4 (0.3,0.3,0.3,1.0)); | 357 | gl_Position = (vi1) * (vec4 (0.3,0.3,0.3,1.0)); |
342 | vo1 = vi1; | 358 | vo1 = vi1; |
343 | } | 359 | } |
344 | |||
345 | """ | 360 | """ |
346 | , geometryShader = Nothing | 361 | , geometryShader = Nothing |
347 | , fragmentShader = | 362 | , fragmentShader = |
348 | """ | 363 | """ |
349 | #version 330 core | 364 | #version 330 core |
350 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 365 | vec4 texture2D(sampler2D s,vec2 uv) { |
351 | uniform float Time ; | 366 | return texture(s,uv); |
352 | smooth in vec4 vo1 ; | 367 | } |
353 | out vec4 f0 ; | 368 | uniform float Time; |
369 | smooth in vec4 vo1; | ||
370 | out vec4 f0; | ||
354 | void main() { | 371 | void main() { |
355 | if (!((sin ((10.0) * (((mat4 | 372 | if (!((sin ((10.0) * (((mat4 |
356 | (vec4 (cos (Time),0.0,(0.0) - (sin (Time)),0.0) | 373 | (vec4 (cos (Time),0.0,(0.0) - (sin (Time)),0.0) |
357 | ,vec4 (0.0,1.0,0.0,0.0) | 374 | ,vec4 (0.0,1.0,0.0,0.0) |
358 | ,vec4 (sin (Time),0.0,cos (Time),0.0) | 375 | ,vec4 (sin (Time),0.0,cos (Time),0.0) |
359 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 | 376 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 |
360 | (vec4 (cos ((Time) * (0.3)),sin ((Time) * (0.3)),0.0,0.0) | 377 | (vec4 (cos ((Time) * (0.3)),sin ((Time) * (0.3)),0.0,0.0) |
361 | ,vec4 | 378 | ,vec4 |
362 | ((0.0) - (sin ((Time) * (0.3))),cos ((Time) * (0.3)),0.0,0.0) | 379 | ((0.0) - (sin ((Time) * (0.3))),cos ((Time) * (0.3)),0.0,0.0) |
363 | ,vec4 (0.0,0.0,1.0,0.0) | 380 | ,vec4 (0.0,0.0,1.0,0.0) |
364 | ,vec4 (0.0,0.0,0.0,1.0))) * (vo1))).x))) > (0.5))) discard; | 381 | ,vec4 (0.0,0.0,0.0,1.0))) * (vo1))).x))) > (0.5))) discard; |
365 | f0 = vec4 (0.7,0.7,0.7,1.0); | 382 | f0 = vec4 (0.7,0.7,0.7,1.0); |
366 | } | 383 | } |
367 | |||
368 | """ | 384 | """ |
369 | } | 385 | } |
370 | , Program | 386 | , Program |
@@ -377,37 +393,39 @@ Pipeline | |||
377 | , vertexShader = | 393 | , vertexShader = |
378 | """ | 394 | """ |
379 | #version 330 core | 395 | #version 330 core |
380 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 396 | vec4 texture2D(sampler2D s,vec2 uv) { |
381 | in vec4 vi1 ; | 397 | return texture(s,uv); |
382 | smooth out vec4 vo1 ; | 398 | } |
399 | in vec4 vi1; | ||
400 | smooth out vec4 vo1; | ||
383 | void main() { | 401 | void main() { |
384 | gl_Position = (vi1) * (vec4 (0.2,0.2,0.2,1.0)); | 402 | gl_Position = (vi1) * (vec4 (0.2,0.2,0.2,1.0)); |
385 | vo1 = vi1; | 403 | vo1 = vi1; |
386 | } | 404 | } |
387 | |||
388 | """ | 405 | """ |
389 | , geometryShader = Nothing | 406 | , geometryShader = Nothing |
390 | , fragmentShader = | 407 | , fragmentShader = |
391 | """ | 408 | """ |
392 | #version 330 core | 409 | #version 330 core |
393 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 410 | vec4 texture2D(sampler2D s,vec2 uv) { |
394 | uniform float Time ; | 411 | return texture(s,uv); |
395 | smooth in vec4 vo1 ; | 412 | } |
396 | out vec4 f0 ; | 413 | uniform float Time; |
414 | smooth in vec4 vo1; | ||
415 | out vec4 f0; | ||
397 | void main() { | 416 | void main() { |
398 | if (!((sin ((10.0) * (((mat4 | 417 | if (!((sin ((10.0) * (((mat4 |
399 | (vec4 (cos (Time),0.0,(0.0) - (sin (Time)),0.0) | 418 | (vec4 (cos (Time),0.0,(0.0) - (sin (Time)),0.0) |
400 | ,vec4 (0.0,1.0,0.0,0.0) | 419 | ,vec4 (0.0,1.0,0.0,0.0) |
401 | ,vec4 (sin (Time),0.0,cos (Time),0.0) | 420 | ,vec4 (sin (Time),0.0,cos (Time),0.0) |
402 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 | 421 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 |
403 | (vec4 (cos ((Time) * (0.2)),sin ((Time) * (0.2)),0.0,0.0) | 422 | (vec4 (cos ((Time) * (0.2)),sin ((Time) * (0.2)),0.0,0.0) |
404 | ,vec4 | 423 | ,vec4 |
405 | ((0.0) - (sin ((Time) * (0.2))),cos ((Time) * (0.2)),0.0,0.0) | 424 | ((0.0) - (sin ((Time) * (0.2))),cos ((Time) * (0.2)),0.0,0.0) |
406 | ,vec4 (0.0,0.0,1.0,0.0) | 425 | ,vec4 (0.0,0.0,1.0,0.0) |
407 | ,vec4 (0.0,0.0,0.0,1.0))) * (vo1))).x))) > (0.5))) discard; | 426 | ,vec4 (0.0,0.0,0.0,1.0))) * (vo1))).x))) > (0.5))) discard; |
408 | f0 = vec4 (0.8,0.8,0.8,1.0); | 427 | f0 = vec4 (0.8,0.8,0.8,1.0); |
409 | } | 428 | } |
410 | |||
411 | """ | 429 | """ |
412 | } | 430 | } |
413 | , Program | 431 | , Program |
@@ -420,37 +438,39 @@ Pipeline | |||
420 | , vertexShader = | 438 | , vertexShader = |
421 | """ | 439 | """ |
422 | #version 330 core | 440 | #version 330 core |
423 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 441 | vec4 texture2D(sampler2D s,vec2 uv) { |
424 | in vec4 vi1 ; | 442 | return texture(s,uv); |
425 | smooth out vec4 vo1 ; | 443 | } |
444 | in vec4 vi1; | ||
445 | smooth out vec4 vo1; | ||
426 | void main() { | 446 | void main() { |
427 | gl_Position = (vi1) * (vec4 (0.1,0.1,0.1,1.0)); | 447 | gl_Position = (vi1) * (vec4 (0.1,0.1,0.1,1.0)); |
428 | vo1 = vi1; | 448 | vo1 = vi1; |
429 | } | 449 | } |
430 | |||
431 | """ | 450 | """ |
432 | , geometryShader = Nothing | 451 | , geometryShader = Nothing |
433 | , fragmentShader = | 452 | , fragmentShader = |
434 | """ | 453 | """ |
435 | #version 330 core | 454 | #version 330 core |
436 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 455 | vec4 texture2D(sampler2D s,vec2 uv) { |
437 | uniform float Time ; | 456 | return texture(s,uv); |
438 | smooth in vec4 vo1 ; | 457 | } |
439 | out vec4 f0 ; | 458 | uniform float Time; |
459 | smooth in vec4 vo1; | ||
460 | out vec4 f0; | ||
440 | void main() { | 461 | void main() { |
441 | if (!((sin ((10.0) * (((mat4 | 462 | if (!((sin ((10.0) * (((mat4 |
442 | (vec4 (cos (Time),0.0,(0.0) - (sin (Time)),0.0) | 463 | (vec4 (cos (Time),0.0,(0.0) - (sin (Time)),0.0) |
443 | ,vec4 (0.0,1.0,0.0,0.0) | 464 | ,vec4 (0.0,1.0,0.0,0.0) |
444 | ,vec4 (sin (Time),0.0,cos (Time),0.0) | 465 | ,vec4 (sin (Time),0.0,cos (Time),0.0) |
445 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 | 466 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 |
446 | (vec4 (cos ((Time) * (0.1)),sin ((Time) * (0.1)),0.0,0.0) | 467 | (vec4 (cos ((Time) * (0.1)),sin ((Time) * (0.1)),0.0,0.0) |
447 | ,vec4 | 468 | ,vec4 |
448 | ((0.0) - (sin ((Time) * (0.1))),cos ((Time) * (0.1)),0.0,0.0) | 469 | ((0.0) - (sin ((Time) * (0.1))),cos ((Time) * (0.1)),0.0,0.0) |
449 | ,vec4 (0.0,0.0,1.0,0.0) | 470 | ,vec4 (0.0,0.0,1.0,0.0) |
450 | ,vec4 (0.0,0.0,0.0,1.0))) * (vo1))).x))) > (0.5))) discard; | 471 | ,vec4 (0.0,0.0,0.0,1.0))) * (vo1))).x))) > (0.5))) discard; |
451 | f0 = vec4 (0.9,0.9,0.9,1.0); | 472 | f0 = vec4 (0.9,0.9,0.9,1.0); |
452 | } | 473 | } |
453 | |||
454 | """ | 474 | """ |
455 | } | 475 | } |
456 | ] | 476 | ] |
diff --git a/testdata/editor-examples/Tetrahedron.out b/testdata/editor-examples/Tetrahedron.out index a56a18d1..77fe2a7e 100644 --- a/testdata/editor-examples/Tetrahedron.out +++ b/testdata/editor-examples/Tetrahedron.out | |||
@@ -25,38 +25,40 @@ Pipeline | |||
25 | , vertexShader = | 25 | , vertexShader = |
26 | """ | 26 | """ |
27 | #version 330 core | 27 | #version 330 core |
28 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 28 | vec4 texture2D(sampler2D s,vec2 uv) { |
29 | uniform mat4 MVP ; | 29 | return texture(s,uv); |
30 | in vec4 vi1 ; | 30 | } |
31 | smooth out vec4 vo1 ; | 31 | uniform mat4 MVP; |
32 | in vec4 vi1; | ||
33 | smooth out vec4 vo1; | ||
32 | void main() { | 34 | void main() { |
33 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); | 35 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); |
34 | vo1 = vi1; | 36 | vo1 = vi1; |
35 | } | 37 | } |
36 | |||
37 | """ | 38 | """ |
38 | , geometryShader = Nothing | 39 | , geometryShader = Nothing |
39 | , fragmentShader = | 40 | , fragmentShader = |
40 | """ | 41 | """ |
41 | #version 330 core | 42 | #version 330 core |
42 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 43 | vec4 texture2D(sampler2D s,vec2 uv) { |
43 | uniform float Time ; | 44 | return texture(s,uv); |
44 | smooth in vec4 vo1 ; | 45 | } |
45 | out vec4 f0 ; | 46 | uniform float Time; |
47 | smooth in vec4 vo1; | ||
48 | out vec4 f0; | ||
46 | void main() { | 49 | void main() { |
47 | if (!(true)) discard; | 50 | if (!(true)) discard; |
48 | f0 = ((mat4 (vec4 (cos (Time),sin (Time),0.0,0.0) | 51 | f0 = ((mat4 (vec4 (cos (Time),sin (Time),0.0,0.0) |
49 | ,vec4 ((0.0) - (sin (Time)),cos (Time),0.0,0.0) | 52 | ,vec4 ((0.0) - (sin (Time)),cos (Time),0.0,0.0) |
50 | ,vec4 (0.0,0.0,1.0,0.0) | 53 | ,vec4 (0.0,0.0,1.0,0.0) |
51 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 | 54 | ,vec4 (0.0,0.0,0.0,1.0))) * ((mat4 |
52 | (vec4 (cos (Time),0.0,(0.0) - (sin (Time)),0.0) | 55 | (vec4 (cos (Time),0.0,(0.0) - (sin (Time)),0.0) |
53 | ,vec4 (0.0,1.0,0.0,0.0) | 56 | ,vec4 (0.0,1.0,0.0,0.0) |
54 | ,vec4 (sin (Time),0.0,cos (Time),0.0) | 57 | ,vec4 (sin (Time),0.0,cos (Time),0.0) |
55 | ,vec4 (0.0,0.0,0.0,1.0))) * (vo1))) * ((mod | 58 | ,vec4 (0.0,0.0,0.0,1.0))) * (vo1))) * ((mod |
56 | (((Time) + (sin (Time))) + (sin ((1.1) * (Time))) | 59 | (((Time) + (sin (Time))) + (sin ((1.1) * (Time))) |
57 | ,4.0)) * (2.0)); | 60 | ,4.0)) * (2.0)); |
58 | } | 61 | } |
59 | |||
60 | """ | 62 | """ |
61 | } | 63 | } |
62 | ] | 64 | ] |
diff --git a/testdata/editor-examples/Texturing.out b/testdata/editor-examples/Texturing.out index 305c4a1c..776af2b9 100644 --- a/testdata/editor-examples/Texturing.out +++ b/testdata/editor-examples/Texturing.out | |||
@@ -27,29 +27,31 @@ Pipeline | |||
27 | , vertexShader = | 27 | , vertexShader = |
28 | """ | 28 | """ |
29 | #version 330 core | 29 | #version 330 core |
30 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 30 | vec4 texture2D(sampler2D s,vec2 uv) { |
31 | uniform mat4 MVP ; | 31 | return texture(s,uv); |
32 | in vec4 vi1 ; | 32 | } |
33 | in vec2 vi2 ; | 33 | uniform mat4 MVP; |
34 | smooth out vec2 vo1 ; | 34 | in vec4 vi1; |
35 | in vec2 vi2; | ||
36 | smooth out vec2 vo1; | ||
35 | void main() { | 37 | void main() { |
36 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); | 38 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); |
37 | vo1 = vi2; | 39 | vo1 = vi2; |
38 | } | 40 | } |
39 | |||
40 | """ | 41 | """ |
41 | , geometryShader = Nothing | 42 | , geometryShader = Nothing |
42 | , fragmentShader = | 43 | , fragmentShader = |
43 | """ | 44 | """ |
44 | #version 330 core | 45 | #version 330 core |
45 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 46 | vec4 texture2D(sampler2D s,vec2 uv) { |
46 | uniform sampler2D Diffuse ; | 47 | return texture(s,uv); |
47 | smooth in vec2 vo1 ; | 48 | } |
48 | out vec4 f0 ; | 49 | uniform sampler2D Diffuse; |
50 | smooth in vec2 vo1; | ||
51 | out vec4 f0; | ||
49 | void main() { | 52 | void main() { |
50 | f0 = texture2D (Diffuse,vo1); | 53 | f0 = texture2D (Diffuse,vo1); |
51 | } | 54 | } |
52 | |||
53 | """ | 55 | """ |
54 | } | 56 | } |
55 | ] | 57 | ] |
diff --git a/testdata/example06.out b/testdata/example06.out index 9c7657de..c75cf074 100644 --- a/testdata/example06.out +++ b/testdata/example06.out | |||
@@ -24,27 +24,29 @@ Pipeline | |||
24 | , vertexShader = | 24 | , vertexShader = |
25 | """ | 25 | """ |
26 | #version 330 core | 26 | #version 330 core |
27 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 27 | vec4 texture2D(sampler2D s,vec2 uv) { |
28 | uniform mat4 MVP ; | 28 | return texture(s,uv); |
29 | in vec4 vi1 ; | 29 | } |
30 | smooth out vec4 vo1 ; | 30 | uniform mat4 MVP; |
31 | in vec4 vi1; | ||
32 | smooth out vec4 vo1; | ||
31 | void main() { | 33 | void main() { |
32 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); | 34 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); |
33 | vo1 = vi1; | 35 | vo1 = vi1; |
34 | } | 36 | } |
35 | |||
36 | """ | 37 | """ |
37 | , geometryShader = Nothing | 38 | , geometryShader = Nothing |
38 | , fragmentShader = | 39 | , fragmentShader = |
39 | """ | 40 | """ |
40 | #version 330 core | 41 | #version 330 core |
41 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 42 | vec4 texture2D(sampler2D s,vec2 uv) { |
42 | smooth in vec4 vo1 ; | 43 | return texture(s,uv); |
43 | out vec4 f0 ; | 44 | } |
45 | smooth in vec4 vo1; | ||
46 | out vec4 f0; | ||
44 | void main() { | 47 | void main() { |
45 | f0 = vo1; | 48 | f0 = vo1; |
46 | } | 49 | } |
47 | |||
48 | """ | 50 | """ |
49 | } | 51 | } |
50 | ] | 52 | ] |
diff --git a/testdata/example07.out b/testdata/example07.out index a7c17a3d..0b0b1166 100644 --- a/testdata/example07.out +++ b/testdata/example07.out | |||
@@ -24,28 +24,30 @@ Pipeline | |||
24 | , vertexShader = | 24 | , vertexShader = |
25 | """ | 25 | """ |
26 | #version 330 core | 26 | #version 330 core |
27 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 27 | vec4 texture2D(sampler2D s,vec2 uv) { |
28 | uniform mat4 MVP ; | 28 | return texture(s,uv); |
29 | in vec4 vi1 ; | 29 | } |
30 | smooth out vec4 vo1 ; | 30 | uniform mat4 MVP; |
31 | in vec4 vi1; | ||
32 | smooth out vec4 vo1; | ||
31 | void main() { | 33 | void main() { |
32 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); | 34 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); |
33 | vo1 = vi1; | 35 | vo1 = vi1; |
34 | } | 36 | } |
35 | |||
36 | """ | 37 | """ |
37 | , geometryShader = Nothing | 38 | , geometryShader = Nothing |
38 | , fragmentShader = | 39 | , fragmentShader = |
39 | """ | 40 | """ |
40 | #version 330 core | 41 | #version 330 core |
41 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 42 | vec4 texture2D(sampler2D s,vec2 uv) { |
42 | smooth in vec4 vo1 ; | 43 | return texture(s,uv); |
43 | out vec4 f0 ; | 44 | } |
45 | smooth in vec4 vo1; | ||
46 | out vec4 f0; | ||
44 | void main() { | 47 | void main() { |
45 | f0 = ((vo1).x) < (0.5) ? vec4 (0.0,0.0,1.0,1.0) : vec4 | 48 | f0 = ((vo1).x) < (0.5) ? vec4 (0.0,0.0,1.0,1.0) : vec4 |
46 | (1.0,0.0,0.0,1.0); | 49 | (1.0,0.0,0.0,1.0); |
47 | } | 50 | } |
48 | |||
49 | """ | 51 | """ |
50 | } | 52 | } |
51 | ] | 53 | ] |
diff --git a/testdata/example08.out b/testdata/example08.out index ff764f08..2b9339c8 100644 --- a/testdata/example08.out +++ b/testdata/example08.out | |||
@@ -25,45 +25,47 @@ Pipeline | |||
25 | , vertexShader = | 25 | , vertexShader = |
26 | """ | 26 | """ |
27 | #version 330 core | 27 | #version 330 core |
28 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 28 | vec4 texture2D(sampler2D s,vec2 uv) { |
29 | uniform mat4 MVP ; | 29 | return texture(s,uv); |
30 | uniform float Time ; | 30 | } |
31 | in vec4 vi1 ; | 31 | uniform mat4 MVP; |
32 | smooth out vec4 vo1 ; | 32 | uniform float Time; |
33 | in vec4 vi1; | ||
34 | smooth out vec4 vo1; | ||
33 | void main() { | 35 | void main() { |
34 | gl_Position = (mat4 | 36 | gl_Position = (mat4 |
35 | (vec4 (cos ((Time) * (2.0)),sin ((Time) * (2.0)),0.0,0.0) | 37 | (vec4 (cos ((Time) * (2.0)),sin ((Time) * (2.0)),0.0,0.0) |
36 | ,vec4 | 38 | ,vec4 |
37 | ((0.0) - (sin ((Time) * (2.0))),cos ((Time) * (2.0)),0.0,0.0) | 39 | ((0.0) - (sin ((Time) * (2.0))),cos ((Time) * (2.0)),0.0,0.0) |
38 | ,vec4 (0.0,0.0,1.0,0.0) | 40 | ,vec4 (0.0,0.0,1.0,0.0) |
39 | ,vec4 (0.0,0.0,0.0,1.0))) * ((MVP) * ((vec4 | 41 | ,vec4 (0.0,0.0,0.0,1.0))) * ((MVP) * ((vec4 |
40 | ((1.0) + ((sin (Time)) * (0.1)),0.0,0.0,0.0)) + (((mat4 | 42 | ((1.0) + ((sin (Time)) * (0.1)),0.0,0.0,0.0)) + (((mat4 |
41 | (vec4 (1.0,0.0,0.0,0.0) | 43 | (vec4 (1.0,0.0,0.0,0.0) |
42 | ,vec4 (0.0 | 44 | ,vec4 (0.0 |
43 | ,cos (((Time) * (2.0)) * (2.0)) | 45 | ,cos (((Time) * (2.0)) * (2.0)) |
44 | ,sin (((Time) * (2.0)) * (2.0)) | 46 | ,sin (((Time) * (2.0)) * (2.0)) |
45 | ,0.0) | 47 | ,0.0) |
46 | ,vec4 (0.0 | 48 | ,vec4 (0.0 |
47 | ,(0.0) - (sin (((Time) * (2.0)) * (2.0))) | 49 | ,(0.0) - (sin (((Time) * (2.0)) * (2.0))) |
48 | ,cos (((Time) * (2.0)) * (2.0)) | 50 | ,cos (((Time) * (2.0)) * (2.0)) |
49 | ,0.0) | 51 | ,0.0) |
50 | ,vec4 (0.0,0.0,0.0,1.0))) * (vi1)) * (vec4 | 52 | ,vec4 (0.0,0.0,0.0,1.0))) * (vi1)) * (vec4 |
51 | (4.0e-2,4.0e-2,4.0e-2,1.0))))); | 53 | (4.0e-2,4.0e-2,4.0e-2,1.0))))); |
52 | vo1 = vi1; | 54 | vo1 = vi1; |
53 | } | 55 | } |
54 | |||
55 | """ | 56 | """ |
56 | , geometryShader = Nothing | 57 | , geometryShader = Nothing |
57 | , fragmentShader = | 58 | , fragmentShader = |
58 | """ | 59 | """ |
59 | #version 330 core | 60 | #version 330 core |
60 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 61 | vec4 texture2D(sampler2D s,vec2 uv) { |
61 | smooth in vec4 vo1 ; | 62 | return texture(s,uv); |
62 | out vec4 f0 ; | 63 | } |
64 | smooth in vec4 vo1; | ||
65 | out vec4 f0; | ||
63 | void main() { | 66 | void main() { |
64 | f0 = vo1; | 67 | f0 = vo1; |
65 | } | 68 | } |
66 | |||
67 | """ | 69 | """ |
68 | } | 70 | } |
69 | , Program | 71 | , Program |
@@ -77,45 +79,47 @@ Pipeline | |||
77 | , vertexShader = | 79 | , vertexShader = |
78 | """ | 80 | """ |
79 | #version 330 core | 81 | #version 330 core |
80 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 82 | vec4 texture2D(sampler2D s,vec2 uv) { |
81 | uniform mat4 MVP ; | 83 | return texture(s,uv); |
82 | uniform float Time ; | 84 | } |
83 | in vec4 vi1 ; | 85 | uniform mat4 MVP; |
84 | smooth out vec4 vo1 ; | 86 | uniform float Time; |
87 | in vec4 vi1; | ||
88 | smooth out vec4 vo1; | ||
85 | void main() { | 89 | void main() { |
86 | gl_Position = (mat4 | 90 | gl_Position = (mat4 |
87 | (vec4 (cos ((Time) * (1.0)),sin ((Time) * (1.0)),0.0,0.0) | 91 | (vec4 (cos ((Time) * (1.0)),sin ((Time) * (1.0)),0.0,0.0) |
88 | ,vec4 | 92 | ,vec4 |
89 | ((0.0) - (sin ((Time) * (1.0))),cos ((Time) * (1.0)),0.0,0.0) | 93 | ((0.0) - (sin ((Time) * (1.0))),cos ((Time) * (1.0)),0.0,0.0) |
90 | ,vec4 (0.0,0.0,1.0,0.0) | 94 | ,vec4 (0.0,0.0,1.0,0.0) |
91 | ,vec4 (0.0,0.0,0.0,1.0))) * ((MVP) * ((vec4 | 95 | ,vec4 (0.0,0.0,0.0,1.0))) * ((MVP) * ((vec4 |
92 | ((0.5) + ((sin (Time)) * (0.1)),0.0,0.0,0.0)) + (((mat4 | 96 | ((0.5) + ((sin (Time)) * (0.1)),0.0,0.0,0.0)) + (((mat4 |
93 | (vec4 (1.0,0.0,0.0,0.0) | 97 | (vec4 (1.0,0.0,0.0,0.0) |
94 | ,vec4 (0.0 | 98 | ,vec4 (0.0 |
95 | ,cos (((Time) * (2.0)) * (1.0)) | 99 | ,cos (((Time) * (2.0)) * (1.0)) |
96 | ,sin (((Time) * (2.0)) * (1.0)) | 100 | ,sin (((Time) * (2.0)) * (1.0)) |
97 | ,0.0) | 101 | ,0.0) |
98 | ,vec4 (0.0 | 102 | ,vec4 (0.0 |
99 | ,(0.0) - (sin (((Time) * (2.0)) * (1.0))) | 103 | ,(0.0) - (sin (((Time) * (2.0)) * (1.0))) |
100 | ,cos (((Time) * (2.0)) * (1.0)) | 104 | ,cos (((Time) * (2.0)) * (1.0)) |
101 | ,0.0) | 105 | ,0.0) |
102 | ,vec4 (0.0,0.0,0.0,1.0))) * (vi1)) * (vec4 | 106 | ,vec4 (0.0,0.0,0.0,1.0))) * (vi1)) * (vec4 |
103 | (4.0e-2,4.0e-2,4.0e-2,1.0))))); | 107 | (4.0e-2,4.0e-2,4.0e-2,1.0))))); |
104 | vo1 = vi1; | 108 | vo1 = vi1; |
105 | } | 109 | } |
106 | |||
107 | """ | 110 | """ |
108 | , geometryShader = Nothing | 111 | , geometryShader = Nothing |
109 | , fragmentShader = | 112 | , fragmentShader = |
110 | """ | 113 | """ |
111 | #version 330 core | 114 | #version 330 core |
112 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 115 | vec4 texture2D(sampler2D s,vec2 uv) { |
113 | smooth in vec4 vo1 ; | 116 | return texture(s,uv); |
114 | out vec4 f0 ; | 117 | } |
118 | smooth in vec4 vo1; | ||
119 | out vec4 f0; | ||
115 | void main() { | 120 | void main() { |
116 | f0 = vo1; | 121 | f0 = vo1; |
117 | } | 122 | } |
118 | |||
119 | """ | 123 | """ |
120 | } | 124 | } |
121 | , Program | 125 | , Program |
@@ -129,45 +133,47 @@ Pipeline | |||
129 | , vertexShader = | 133 | , vertexShader = |
130 | """ | 134 | """ |
131 | #version 330 core | 135 | #version 330 core |
132 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 136 | vec4 texture2D(sampler2D s,vec2 uv) { |
133 | uniform mat4 MVP ; | 137 | return texture(s,uv); |
134 | uniform float Time ; | 138 | } |
135 | in vec4 vi1 ; | 139 | uniform mat4 MVP; |
136 | smooth out vec4 vo1 ; | 140 | uniform float Time; |
141 | in vec4 vi1; | ||
142 | smooth out vec4 vo1; | ||
137 | void main() { | 143 | void main() { |
138 | gl_Position = (mat4 | 144 | gl_Position = (mat4 |
139 | (vec4 (cos ((Time) * (0.0)),sin ((Time) * (0.0)),0.0,0.0) | 145 | (vec4 (cos ((Time) * (0.0)),sin ((Time) * (0.0)),0.0,0.0) |
140 | ,vec4 | 146 | ,vec4 |
141 | ((0.0) - (sin ((Time) * (0.0))),cos ((Time) * (0.0)),0.0,0.0) | 147 | ((0.0) - (sin ((Time) * (0.0))),cos ((Time) * (0.0)),0.0,0.0) |
142 | ,vec4 (0.0,0.0,1.0,0.0) | 148 | ,vec4 (0.0,0.0,1.0,0.0) |
143 | ,vec4 (0.0,0.0,0.0,1.0))) * ((MVP) * ((vec4 | 149 | ,vec4 (0.0,0.0,0.0,1.0))) * ((MVP) * ((vec4 |
144 | ((0.0) + ((sin (Time)) * (0.1)),0.0,0.0,0.0)) + (((mat4 | 150 | ((0.0) + ((sin (Time)) * (0.1)),0.0,0.0,0.0)) + (((mat4 |
145 | (vec4 (1.0,0.0,0.0,0.0) | 151 | (vec4 (1.0,0.0,0.0,0.0) |
146 | ,vec4 (0.0 | 152 | ,vec4 (0.0 |
147 | ,cos (((Time) * (2.0)) * (0.0)) | 153 | ,cos (((Time) * (2.0)) * (0.0)) |
148 | ,sin (((Time) * (2.0)) * (0.0)) | 154 | ,sin (((Time) * (2.0)) * (0.0)) |
149 | ,0.0) | 155 | ,0.0) |
150 | ,vec4 (0.0 | 156 | ,vec4 (0.0 |
151 | ,(0.0) - (sin (((Time) * (2.0)) * (0.0))) | 157 | ,(0.0) - (sin (((Time) * (2.0)) * (0.0))) |
152 | ,cos (((Time) * (2.0)) * (0.0)) | 158 | ,cos (((Time) * (2.0)) * (0.0)) |
153 | ,0.0) | 159 | ,0.0) |
154 | ,vec4 (0.0,0.0,0.0,1.0))) * (vi1)) * (vec4 | 160 | ,vec4 (0.0,0.0,0.0,1.0))) * (vi1)) * (vec4 |
155 | (4.0e-2,4.0e-2,4.0e-2,1.0))))); | 161 | (4.0e-2,4.0e-2,4.0e-2,1.0))))); |
156 | vo1 = vi1; | 162 | vo1 = vi1; |
157 | } | 163 | } |
158 | |||
159 | """ | 164 | """ |
160 | , geometryShader = Nothing | 165 | , geometryShader = Nothing |
161 | , fragmentShader = | 166 | , fragmentShader = |
162 | """ | 167 | """ |
163 | #version 330 core | 168 | #version 330 core |
164 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 169 | vec4 texture2D(sampler2D s,vec2 uv) { |
165 | smooth in vec4 vo1 ; | 170 | return texture(s,uv); |
166 | out vec4 f0 ; | 171 | } |
172 | smooth in vec4 vo1; | ||
173 | out vec4 f0; | ||
167 | void main() { | 174 | void main() { |
168 | f0 = vo1; | 175 | f0 = vo1; |
169 | } | 176 | } |
170 | |||
171 | """ | 177 | """ |
172 | } | 178 | } |
173 | , Program | 179 | , Program |
@@ -181,45 +187,47 @@ Pipeline | |||
181 | , vertexShader = | 187 | , vertexShader = |
182 | """ | 188 | """ |
183 | #version 330 core | 189 | #version 330 core |
184 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 190 | vec4 texture2D(sampler2D s,vec2 uv) { |
185 | uniform mat4 MVP ; | 191 | return texture(s,uv); |
186 | uniform float Time ; | 192 | } |
187 | in vec4 vi1 ; | 193 | uniform mat4 MVP; |
188 | smooth out vec4 vo1 ; | 194 | uniform float Time; |
195 | in vec4 vi1; | ||
196 | smooth out vec4 vo1; | ||
189 | void main() { | 197 | void main() { |
190 | gl_Position = (mat4 | 198 | gl_Position = (mat4 |
191 | (vec4 (cos ((Time) * (-1.0)),sin ((Time) * (-1.0)),0.0,0.0) | 199 | (vec4 (cos ((Time) * (-1.0)),sin ((Time) * (-1.0)),0.0,0.0) |
192 | ,vec4 | 200 | ,vec4 |
193 | ((0.0) - (sin ((Time) * (-1.0))),cos ((Time) * (-1.0)),0.0,0.0) | 201 | ((0.0) - (sin ((Time) * (-1.0))),cos ((Time) * (-1.0)),0.0,0.0) |
194 | ,vec4 (0.0,0.0,1.0,0.0) | 202 | ,vec4 (0.0,0.0,1.0,0.0) |
195 | ,vec4 (0.0,0.0,0.0,1.0))) * ((MVP) * ((vec4 | 203 | ,vec4 (0.0,0.0,0.0,1.0))) * ((MVP) * ((vec4 |
196 | ((-0.5) + ((sin (Time)) * (0.1)),0.0,0.0,0.0)) + (((mat4 | 204 | ((-0.5) + ((sin (Time)) * (0.1)),0.0,0.0,0.0)) + (((mat4 |
197 | (vec4 (1.0,0.0,0.0,0.0) | 205 | (vec4 (1.0,0.0,0.0,0.0) |
198 | ,vec4 (0.0 | 206 | ,vec4 (0.0 |
199 | ,cos (((Time) * (2.0)) * (-1.0)) | 207 | ,cos (((Time) * (2.0)) * (-1.0)) |
200 | ,sin (((Time) * (2.0)) * (-1.0)) | 208 | ,sin (((Time) * (2.0)) * (-1.0)) |
201 | ,0.0) | 209 | ,0.0) |
202 | ,vec4 (0.0 | 210 | ,vec4 (0.0 |
203 | ,(0.0) - (sin (((Time) * (2.0)) * (-1.0))) | 211 | ,(0.0) - (sin (((Time) * (2.0)) * (-1.0))) |
204 | ,cos (((Time) * (2.0)) * (-1.0)) | 212 | ,cos (((Time) * (2.0)) * (-1.0)) |
205 | ,0.0) | 213 | ,0.0) |
206 | ,vec4 (0.0,0.0,0.0,1.0))) * (vi1)) * (vec4 | 214 | ,vec4 (0.0,0.0,0.0,1.0))) * (vi1)) * (vec4 |
207 | (4.0e-2,4.0e-2,4.0e-2,1.0))))); | 215 | (4.0e-2,4.0e-2,4.0e-2,1.0))))); |
208 | vo1 = vi1; | 216 | vo1 = vi1; |
209 | } | 217 | } |
210 | |||
211 | """ | 218 | """ |
212 | , geometryShader = Nothing | 219 | , geometryShader = Nothing |
213 | , fragmentShader = | 220 | , fragmentShader = |
214 | """ | 221 | """ |
215 | #version 330 core | 222 | #version 330 core |
216 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 223 | vec4 texture2D(sampler2D s,vec2 uv) { |
217 | smooth in vec4 vo1 ; | 224 | return texture(s,uv); |
218 | out vec4 f0 ; | 225 | } |
226 | smooth in vec4 vo1; | ||
227 | out vec4 f0; | ||
219 | void main() { | 228 | void main() { |
220 | f0 = vo1; | 229 | f0 = vo1; |
221 | } | 230 | } |
222 | |||
223 | """ | 231 | """ |
224 | } | 232 | } |
225 | , Program | 233 | , Program |
@@ -233,45 +241,47 @@ Pipeline | |||
233 | , vertexShader = | 241 | , vertexShader = |
234 | """ | 242 | """ |
235 | #version 330 core | 243 | #version 330 core |
236 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 244 | vec4 texture2D(sampler2D s,vec2 uv) { |
237 | uniform mat4 MVP ; | 245 | return texture(s,uv); |
238 | uniform float Time ; | 246 | } |
239 | in vec4 vi1 ; | 247 | uniform mat4 MVP; |
240 | smooth out vec4 vo1 ; | 248 | uniform float Time; |
249 | in vec4 vi1; | ||
250 | smooth out vec4 vo1; | ||
241 | void main() { | 251 | void main() { |
242 | gl_Position = (mat4 | 252 | gl_Position = (mat4 |
243 | (vec4 (cos ((Time) * (0.75)),sin ((Time) * (0.75)),0.0,0.0) | 253 | (vec4 (cos ((Time) * (0.75)),sin ((Time) * (0.75)),0.0,0.0) |
244 | ,vec4 | 254 | ,vec4 |
245 | ((0.0) - (sin ((Time) * (0.75))),cos ((Time) * (0.75)),0.0,0.0) | 255 | ((0.0) - (sin ((Time) * (0.75))),cos ((Time) * (0.75)),0.0,0.0) |
246 | ,vec4 (0.0,0.0,1.0,0.0) | 256 | ,vec4 (0.0,0.0,1.0,0.0) |
247 | ,vec4 (0.0,0.0,0.0,1.0))) * ((MVP) * ((vec4 | 257 | ,vec4 (0.0,0.0,0.0,1.0))) * ((MVP) * ((vec4 |
248 | ((0.375) + ((sin (Time)) * (0.1)),0.0,0.0,0.0)) + (((mat4 | 258 | ((0.375) + ((sin (Time)) * (0.1)),0.0,0.0,0.0)) + (((mat4 |
249 | (vec4 (1.0,0.0,0.0,0.0) | 259 | (vec4 (1.0,0.0,0.0,0.0) |
250 | ,vec4 (0.0 | 260 | ,vec4 (0.0 |
251 | ,cos (((Time) * (2.0)) * (0.75)) | 261 | ,cos (((Time) * (2.0)) * (0.75)) |
252 | ,sin (((Time) * (2.0)) * (0.75)) | 262 | ,sin (((Time) * (2.0)) * (0.75)) |
253 | ,0.0) | 263 | ,0.0) |
254 | ,vec4 (0.0 | 264 | ,vec4 (0.0 |
255 | ,(0.0) - (sin (((Time) * (2.0)) * (0.75))) | 265 | ,(0.0) - (sin (((Time) * (2.0)) * (0.75))) |
256 | ,cos (((Time) * (2.0)) * (0.75)) | 266 | ,cos (((Time) * (2.0)) * (0.75)) |
257 | ,0.0) | 267 | ,0.0) |
258 | ,vec4 (0.0,0.0,0.0,1.0))) * (vi1)) * (vec4 | 268 | ,vec4 (0.0,0.0,0.0,1.0))) * (vi1)) * (vec4 |
259 | (4.0e-2,4.0e-2,4.0e-2,1.0))))); | 269 | (4.0e-2,4.0e-2,4.0e-2,1.0))))); |
260 | vo1 = vi1; | 270 | vo1 = vi1; |
261 | } | 271 | } |
262 | |||
263 | """ | 272 | """ |
264 | , geometryShader = Nothing | 273 | , geometryShader = Nothing |
265 | , fragmentShader = | 274 | , fragmentShader = |
266 | """ | 275 | """ |
267 | #version 330 core | 276 | #version 330 core |
268 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 277 | vec4 texture2D(sampler2D s,vec2 uv) { |
269 | smooth in vec4 vo1 ; | 278 | return texture(s,uv); |
270 | out vec4 f0 ; | 279 | } |
280 | smooth in vec4 vo1; | ||
281 | out vec4 f0; | ||
271 | void main() { | 282 | void main() { |
272 | f0 = vo1; | 283 | f0 = vo1; |
273 | } | 284 | } |
274 | |||
275 | """ | 285 | """ |
276 | } | 286 | } |
277 | , Program | 287 | , Program |
@@ -285,45 +295,47 @@ Pipeline | |||
285 | , vertexShader = | 295 | , vertexShader = |
286 | """ | 296 | """ |
287 | #version 330 core | 297 | #version 330 core |
288 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 298 | vec4 texture2D(sampler2D s,vec2 uv) { |
289 | uniform mat4 MVP ; | 299 | return texture(s,uv); |
290 | uniform float Time ; | 300 | } |
291 | in vec4 vi1 ; | 301 | uniform mat4 MVP; |
292 | smooth out vec4 vo1 ; | 302 | uniform float Time; |
303 | in vec4 vi1; | ||
304 | smooth out vec4 vo1; | ||
293 | void main() { | 305 | void main() { |
294 | gl_Position = (mat4 | 306 | gl_Position = (mat4 |
295 | (vec4 (cos ((Time) * (0.3)),sin ((Time) * (0.3)),0.0,0.0) | 307 | (vec4 (cos ((Time) * (0.3)),sin ((Time) * (0.3)),0.0,0.0) |
296 | ,vec4 | 308 | ,vec4 |
297 | ((0.0) - (sin ((Time) * (0.3))),cos ((Time) * (0.3)),0.0,0.0) | 309 | ((0.0) - (sin ((Time) * (0.3))),cos ((Time) * (0.3)),0.0,0.0) |
298 | ,vec4 (0.0,0.0,1.0,0.0) | 310 | ,vec4 (0.0,0.0,1.0,0.0) |
299 | ,vec4 (0.0,0.0,0.0,1.0))) * ((MVP) * ((vec4 | 311 | ,vec4 (0.0,0.0,0.0,1.0))) * ((MVP) * ((vec4 |
300 | ((0.15) + ((sin (Time)) * (0.1)),0.0,0.0,0.0)) + (((mat4 | 312 | ((0.15) + ((sin (Time)) * (0.1)),0.0,0.0,0.0)) + (((mat4 |
301 | (vec4 (1.0,0.0,0.0,0.0) | 313 | (vec4 (1.0,0.0,0.0,0.0) |
302 | ,vec4 (0.0 | 314 | ,vec4 (0.0 |
303 | ,cos (((Time) * (2.0)) * (0.3)) | 315 | ,cos (((Time) * (2.0)) * (0.3)) |
304 | ,sin (((Time) * (2.0)) * (0.3)) | 316 | ,sin (((Time) * (2.0)) * (0.3)) |
305 | ,0.0) | 317 | ,0.0) |
306 | ,vec4 (0.0 | 318 | ,vec4 (0.0 |
307 | ,(0.0) - (sin (((Time) * (2.0)) * (0.3))) | 319 | ,(0.0) - (sin (((Time) * (2.0)) * (0.3))) |
308 | ,cos (((Time) * (2.0)) * (0.3)) | 320 | ,cos (((Time) * (2.0)) * (0.3)) |
309 | ,0.0) | 321 | ,0.0) |
310 | ,vec4 (0.0,0.0,0.0,1.0))) * (vi1)) * (vec4 | 322 | ,vec4 (0.0,0.0,0.0,1.0))) * (vi1)) * (vec4 |
311 | (4.0e-2,4.0e-2,4.0e-2,1.0))))); | 323 | (4.0e-2,4.0e-2,4.0e-2,1.0))))); |
312 | vo1 = vi1; | 324 | vo1 = vi1; |
313 | } | 325 | } |
314 | |||
315 | """ | 326 | """ |
316 | , geometryShader = Nothing | 327 | , geometryShader = Nothing |
317 | , fragmentShader = | 328 | , fragmentShader = |
318 | """ | 329 | """ |
319 | #version 330 core | 330 | #version 330 core |
320 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 331 | vec4 texture2D(sampler2D s,vec2 uv) { |
321 | smooth in vec4 vo1 ; | 332 | return texture(s,uv); |
322 | out vec4 f0 ; | 333 | } |
334 | smooth in vec4 vo1; | ||
335 | out vec4 f0; | ||
323 | void main() { | 336 | void main() { |
324 | f0 = vo1; | 337 | f0 = vo1; |
325 | } | 338 | } |
326 | |||
327 | """ | 339 | """ |
328 | } | 340 | } |
329 | , Program | 341 | , Program |
@@ -337,45 +349,47 @@ Pipeline | |||
337 | , vertexShader = | 349 | , vertexShader = |
338 | """ | 350 | """ |
339 | #version 330 core | 351 | #version 330 core |
340 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 352 | vec4 texture2D(sampler2D s,vec2 uv) { |
341 | uniform mat4 MVP ; | 353 | return texture(s,uv); |
342 | uniform float Time ; | 354 | } |
343 | in vec4 vi1 ; | 355 | uniform mat4 MVP; |
344 | smooth out vec4 vo1 ; | 356 | uniform float Time; |
357 | in vec4 vi1; | ||
358 | smooth out vec4 vo1; | ||
345 | void main() { | 359 | void main() { |
346 | gl_Position = (mat4 | 360 | gl_Position = (mat4 |
347 | (vec4 (cos ((Time) * (0.5)),sin ((Time) * (0.5)),0.0,0.0) | 361 | (vec4 (cos ((Time) * (0.5)),sin ((Time) * (0.5)),0.0,0.0) |
348 | ,vec4 | 362 | ,vec4 |
349 | ((0.0) - (sin ((Time) * (0.5))),cos ((Time) * (0.5)),0.0,0.0) | 363 | ((0.0) - (sin ((Time) * (0.5))),cos ((Time) * (0.5)),0.0,0.0) |
350 | ,vec4 (0.0,0.0,1.0,0.0) | 364 | ,vec4 (0.0,0.0,1.0,0.0) |
351 | ,vec4 (0.0,0.0,0.0,1.0))) * ((MVP) * ((vec4 | 365 | ,vec4 (0.0,0.0,0.0,1.0))) * ((MVP) * ((vec4 |
352 | ((0.25) + ((sin (Time)) * (0.1)),0.0,0.0,0.0)) + (((mat4 | 366 | ((0.25) + ((sin (Time)) * (0.1)),0.0,0.0,0.0)) + (((mat4 |
353 | (vec4 (1.0,0.0,0.0,0.0) | 367 | (vec4 (1.0,0.0,0.0,0.0) |
354 | ,vec4 (0.0 | 368 | ,vec4 (0.0 |
355 | ,cos (((Time) * (2.0)) * (0.5)) | 369 | ,cos (((Time) * (2.0)) * (0.5)) |
356 | ,sin (((Time) * (2.0)) * (0.5)) | 370 | ,sin (((Time) * (2.0)) * (0.5)) |
357 | ,0.0) | 371 | ,0.0) |
358 | ,vec4 (0.0 | 372 | ,vec4 (0.0 |
359 | ,(0.0) - (sin (((Time) * (2.0)) * (0.5))) | 373 | ,(0.0) - (sin (((Time) * (2.0)) * (0.5))) |
360 | ,cos (((Time) * (2.0)) * (0.5)) | 374 | ,cos (((Time) * (2.0)) * (0.5)) |
361 | ,0.0) | 375 | ,0.0) |
362 | ,vec4 (0.0,0.0,0.0,1.0))) * (vi1)) * (vec4 | 376 | ,vec4 (0.0,0.0,0.0,1.0))) * (vi1)) * (vec4 |
363 | (4.0e-2,4.0e-2,4.0e-2,1.0))))); | 377 | (4.0e-2,4.0e-2,4.0e-2,1.0))))); |
364 | vo1 = vi1; | 378 | vo1 = vi1; |
365 | } | 379 | } |
366 | |||
367 | """ | 380 | """ |
368 | , geometryShader = Nothing | 381 | , geometryShader = Nothing |
369 | , fragmentShader = | 382 | , fragmentShader = |
370 | """ | 383 | """ |
371 | #version 330 core | 384 | #version 330 core |
372 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 385 | vec4 texture2D(sampler2D s,vec2 uv) { |
373 | smooth in vec4 vo1 ; | 386 | return texture(s,uv); |
374 | out vec4 f0 ; | 387 | } |
388 | smooth in vec4 vo1; | ||
389 | out vec4 f0; | ||
375 | void main() { | 390 | void main() { |
376 | f0 = vo1; | 391 | f0 = vo1; |
377 | } | 392 | } |
378 | |||
379 | """ | 393 | """ |
380 | } | 394 | } |
381 | , Program | 395 | , Program |
@@ -389,45 +403,47 @@ Pipeline | |||
389 | , vertexShader = | 403 | , vertexShader = |
390 | """ | 404 | """ |
391 | #version 330 core | 405 | #version 330 core |
392 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 406 | vec4 texture2D(sampler2D s,vec2 uv) { |
393 | uniform mat4 MVP ; | 407 | return texture(s,uv); |
394 | uniform float Time ; | 408 | } |
395 | in vec4 vi1 ; | 409 | uniform mat4 MVP; |
396 | smooth out vec4 vo1 ; | 410 | uniform float Time; |
411 | in vec4 vi1; | ||
412 | smooth out vec4 vo1; | ||
397 | void main() { | 413 | void main() { |
398 | gl_Position = (mat4 | 414 | gl_Position = (mat4 |
399 | (vec4 (cos ((Time) * (0.0)),sin ((Time) * (0.0)),0.0,0.0) | 415 | (vec4 (cos ((Time) * (0.0)),sin ((Time) * (0.0)),0.0,0.0) |
400 | ,vec4 | 416 | ,vec4 |
401 | ((0.0) - (sin ((Time) * (0.0))),cos ((Time) * (0.0)),0.0,0.0) | 417 | ((0.0) - (sin ((Time) * (0.0))),cos ((Time) * (0.0)),0.0,0.0) |
402 | ,vec4 (0.0,0.0,1.0,0.0) | 418 | ,vec4 (0.0,0.0,1.0,0.0) |
403 | ,vec4 (0.0,0.0,0.0,1.0))) * ((MVP) * ((vec4 | 419 | ,vec4 (0.0,0.0,0.0,1.0))) * ((MVP) * ((vec4 |
404 | ((0.0) + ((sin (Time)) * (0.1)),0.0,0.0,0.0)) + (((mat4 | 420 | ((0.0) + ((sin (Time)) * (0.1)),0.0,0.0,0.0)) + (((mat4 |
405 | (vec4 (1.0,0.0,0.0,0.0) | 421 | (vec4 (1.0,0.0,0.0,0.0) |
406 | ,vec4 (0.0 | 422 | ,vec4 (0.0 |
407 | ,cos (((Time) * (2.0)) * (0.0)) | 423 | ,cos (((Time) * (2.0)) * (0.0)) |
408 | ,sin (((Time) * (2.0)) * (0.0)) | 424 | ,sin (((Time) * (2.0)) * (0.0)) |
409 | ,0.0) | 425 | ,0.0) |
410 | ,vec4 (0.0 | 426 | ,vec4 (0.0 |
411 | ,(0.0) - (sin (((Time) * (2.0)) * (0.0))) | 427 | ,(0.0) - (sin (((Time) * (2.0)) * (0.0))) |
412 | ,cos (((Time) * (2.0)) * (0.0)) | 428 | ,cos (((Time) * (2.0)) * (0.0)) |
413 | ,0.0) | 429 | ,0.0) |
414 | ,vec4 (0.0,0.0,0.0,1.0))) * (vi1)) * (vec4 | 430 | ,vec4 (0.0,0.0,0.0,1.0))) * (vi1)) * (vec4 |
415 | (4.0e-2,4.0e-2,4.0e-2,1.0))))); | 431 | (4.0e-2,4.0e-2,4.0e-2,1.0))))); |
416 | vo1 = vi1; | 432 | vo1 = vi1; |
417 | } | 433 | } |
418 | |||
419 | """ | 434 | """ |
420 | , geometryShader = Nothing | 435 | , geometryShader = Nothing |
421 | , fragmentShader = | 436 | , fragmentShader = |
422 | """ | 437 | """ |
423 | #version 330 core | 438 | #version 330 core |
424 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 439 | vec4 texture2D(sampler2D s,vec2 uv) { |
425 | smooth in vec4 vo1 ; | 440 | return texture(s,uv); |
426 | out vec4 f0 ; | 441 | } |
442 | smooth in vec4 vo1; | ||
443 | out vec4 f0; | ||
427 | void main() { | 444 | void main() { |
428 | f0 = vo1; | 445 | f0 = vo1; |
429 | } | 446 | } |
430 | |||
431 | """ | 447 | """ |
432 | } | 448 | } |
433 | , Program | 449 | , Program |
@@ -441,45 +457,47 @@ Pipeline | |||
441 | , vertexShader = | 457 | , vertexShader = |
442 | """ | 458 | """ |
443 | #version 330 core | 459 | #version 330 core |
444 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 460 | vec4 texture2D(sampler2D s,vec2 uv) { |
445 | uniform mat4 MVP ; | 461 | return texture(s,uv); |
446 | uniform float Time ; | 462 | } |
447 | in vec4 vi1 ; | 463 | uniform mat4 MVP; |
448 | smooth out vec4 vo1 ; | 464 | uniform float Time; |
465 | in vec4 vi1; | ||
466 | smooth out vec4 vo1; | ||
449 | void main() { | 467 | void main() { |
450 | gl_Position = (mat4 | 468 | gl_Position = (mat4 |
451 | (vec4 (cos ((Time) * (-0.5)),sin ((Time) * (-0.5)),0.0,0.0) | 469 | (vec4 (cos ((Time) * (-0.5)),sin ((Time) * (-0.5)),0.0,0.0) |
452 | ,vec4 | 470 | ,vec4 |
453 | ((0.0) - (sin ((Time) * (-0.5))),cos ((Time) * (-0.5)),0.0,0.0) | 471 | ((0.0) - (sin ((Time) * (-0.5))),cos ((Time) * (-0.5)),0.0,0.0) |
454 | ,vec4 (0.0,0.0,1.0,0.0) | 472 | ,vec4 (0.0,0.0,1.0,0.0) |
455 | ,vec4 (0.0,0.0,0.0,1.0))) * ((MVP) * ((vec4 | 473 | ,vec4 (0.0,0.0,0.0,1.0))) * ((MVP) * ((vec4 |
456 | ((-0.25) + ((sin (Time)) * (0.1)),0.0,0.0,0.0)) + (((mat4 | 474 | ((-0.25) + ((sin (Time)) * (0.1)),0.0,0.0,0.0)) + (((mat4 |
457 | (vec4 (1.0,0.0,0.0,0.0) | 475 | (vec4 (1.0,0.0,0.0,0.0) |
458 | ,vec4 (0.0 | 476 | ,vec4 (0.0 |
459 | ,cos (((Time) * (2.0)) * (-0.5)) | 477 | ,cos (((Time) * (2.0)) * (-0.5)) |
460 | ,sin (((Time) * (2.0)) * (-0.5)) | 478 | ,sin (((Time) * (2.0)) * (-0.5)) |
461 | ,0.0) | 479 | ,0.0) |
462 | ,vec4 (0.0 | 480 | ,vec4 (0.0 |
463 | ,(0.0) - (sin (((Time) * (2.0)) * (-0.5))) | 481 | ,(0.0) - (sin (((Time) * (2.0)) * (-0.5))) |
464 | ,cos (((Time) * (2.0)) * (-0.5)) | 482 | ,cos (((Time) * (2.0)) * (-0.5)) |
465 | ,0.0) | 483 | ,0.0) |
466 | ,vec4 (0.0,0.0,0.0,1.0))) * (vi1)) * (vec4 | 484 | ,vec4 (0.0,0.0,0.0,1.0))) * (vi1)) * (vec4 |
467 | (4.0e-2,4.0e-2,4.0e-2,1.0))))); | 485 | (4.0e-2,4.0e-2,4.0e-2,1.0))))); |
468 | vo1 = vi1; | 486 | vo1 = vi1; |
469 | } | 487 | } |
470 | |||
471 | """ | 488 | """ |
472 | , geometryShader = Nothing | 489 | , geometryShader = Nothing |
473 | , fragmentShader = | 490 | , fragmentShader = |
474 | """ | 491 | """ |
475 | #version 330 core | 492 | #version 330 core |
476 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 493 | vec4 texture2D(sampler2D s,vec2 uv) { |
477 | smooth in vec4 vo1 ; | 494 | return texture(s,uv); |
478 | out vec4 f0 ; | 495 | } |
496 | smooth in vec4 vo1; | ||
497 | out vec4 f0; | ||
479 | void main() { | 498 | void main() { |
480 | f0 = vo1; | 499 | f0 = vo1; |
481 | } | 500 | } |
482 | |||
483 | """ | 501 | """ |
484 | } | 502 | } |
485 | ] | 503 | ] |
diff --git a/testdata/fetcharrays01.out b/testdata/fetcharrays01.out index 5ab293d2..e3fcfa14 100644 --- a/testdata/fetcharrays01.out +++ b/testdata/fetcharrays01.out | |||
@@ -26,29 +26,31 @@ Pipeline | |||
26 | , vertexShader = | 26 | , vertexShader = |
27 | """ | 27 | """ |
28 | #version 330 core | 28 | #version 330 core |
29 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 29 | vec4 texture2D(sampler2D s,vec2 uv) { |
30 | uniform mat4 MVP ; | 30 | return texture(s,uv); |
31 | in vec3 vi1 ; | 31 | } |
32 | in vec3 vi2 ; | 32 | uniform mat4 MVP; |
33 | smooth out vec4 vo1 ; | 33 | in vec3 vi1; |
34 | in vec3 vi2; | ||
35 | smooth out vec4 vo1; | ||
34 | void main() { | 36 | void main() { |
35 | gl_Position = ((MVP) * (vec4 | 37 | gl_Position = ((MVP) * (vec4 |
36 | ((vi1).x,(vi1).y,(vi1).z,1.0))) * (vec4 (0.5,0.5,0.5,1.0)); | 38 | ((vi1).x,(vi1).y,(vi1).z,1.0))) * (vec4 (0.5,0.5,0.5,1.0)); |
37 | vo1 = vec4 ((vi1).x,(vi1).y,(vi1).z,1.0); | 39 | vo1 = vec4 ((vi1).x,(vi1).y,(vi1).z,1.0); |
38 | } | 40 | } |
39 | |||
40 | """ | 41 | """ |
41 | , geometryShader = Nothing | 42 | , geometryShader = Nothing |
42 | , fragmentShader = | 43 | , fragmentShader = |
43 | """ | 44 | """ |
44 | #version 330 core | 45 | #version 330 core |
45 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 46 | vec4 texture2D(sampler2D s,vec2 uv) { |
46 | smooth in vec4 vo1 ; | 47 | return texture(s,uv); |
47 | out vec4 f0 ; | 48 | } |
49 | smooth in vec4 vo1; | ||
50 | out vec4 f0; | ||
48 | void main() { | 51 | void main() { |
49 | f0 = vo1; | 52 | f0 = vo1; |
50 | } | 53 | } |
51 | |||
52 | """ | 54 | """ |
53 | } | 55 | } |
54 | ] | 56 | ] |
diff --git a/testdata/fragment01.out b/testdata/fragment01.out index c0500173..06fc0e6e 100644 --- a/testdata/fragment01.out +++ b/testdata/fragment01.out | |||
@@ -21,23 +21,25 @@ Pipeline | |||
21 | , vertexShader = | 21 | , vertexShader = |
22 | """ | 22 | """ |
23 | #version 330 core | 23 | #version 330 core |
24 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 24 | vec4 texture2D(sampler2D s,vec2 uv) { |
25 | in vec4 vi1 ; | 25 | return texture(s,uv); |
26 | } | ||
27 | in vec4 vi1; | ||
26 | void main() { | 28 | void main() { |
27 | gl_Position = vi1; | 29 | gl_Position = vi1; |
28 | } | 30 | } |
29 | |||
30 | """ | 31 | """ |
31 | , geometryShader = Nothing | 32 | , geometryShader = Nothing |
32 | , fragmentShader = | 33 | , fragmentShader = |
33 | """ | 34 | """ |
34 | #version 330 core | 35 | #version 330 core |
35 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 36 | vec4 texture2D(sampler2D s,vec2 uv) { |
36 | out vec4 f0 ; | 37 | return texture(s,uv); |
38 | } | ||
39 | out vec4 f0; | ||
37 | void main() { | 40 | void main() { |
38 | f0 = vec4 (0.0,0.0,1.0,1.0); | 41 | f0 = vec4 (0.0,0.0,1.0,1.0); |
39 | } | 42 | } |
40 | |||
41 | """ | 43 | """ |
42 | } | 44 | } |
43 | ] | 45 | ] |
diff --git a/testdata/fragment03swizzling.out b/testdata/fragment03swizzling.out index 39e6ea74..8e68922f 100644 --- a/testdata/fragment03swizzling.out +++ b/testdata/fragment03swizzling.out | |||
@@ -21,26 +21,28 @@ Pipeline | |||
21 | , vertexShader = | 21 | , vertexShader = |
22 | """ | 22 | """ |
23 | #version 330 core | 23 | #version 330 core |
24 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 24 | vec4 texture2D(sampler2D s,vec2 uv) { |
25 | in vec4 vi1 ; | 25 | return texture(s,uv); |
26 | smooth out vec4 vo1 ; | 26 | } |
27 | in vec4 vi1; | ||
28 | smooth out vec4 vo1; | ||
27 | void main() { | 29 | void main() { |
28 | gl_Position = vi1; | 30 | gl_Position = vi1; |
29 | vo1 = vi1; | 31 | vo1 = vi1; |
30 | } | 32 | } |
31 | |||
32 | """ | 33 | """ |
33 | , geometryShader = Nothing | 34 | , geometryShader = Nothing |
34 | , fragmentShader = | 35 | , fragmentShader = |
35 | """ | 36 | """ |
36 | #version 330 core | 37 | #version 330 core |
37 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 38 | vec4 texture2D(sampler2D s,vec2 uv) { |
38 | smooth in vec4 vo1 ; | 39 | return texture(s,uv); |
39 | out vec4 f0 ; | 40 | } |
41 | smooth in vec4 vo1; | ||
42 | out vec4 f0; | ||
40 | void main() { | 43 | void main() { |
41 | f0 = ((vo1).xxxw) + ((vo1).yyyw); | 44 | f0 = ((vo1).xxxw) + ((vo1).yyyw); |
42 | } | 45 | } |
43 | |||
44 | """ | 46 | """ |
45 | } | 47 | } |
46 | ] | 48 | ] |
diff --git a/testdata/fragment04ifthenelse.out b/testdata/fragment04ifthenelse.out index 1588f9fa..3bc71b70 100644 --- a/testdata/fragment04ifthenelse.out +++ b/testdata/fragment04ifthenelse.out | |||
@@ -21,27 +21,29 @@ Pipeline | |||
21 | , vertexShader = | 21 | , vertexShader = |
22 | """ | 22 | """ |
23 | #version 330 core | 23 | #version 330 core |
24 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 24 | vec4 texture2D(sampler2D s,vec2 uv) { |
25 | in vec4 vi1 ; | 25 | return texture(s,uv); |
26 | smooth out vec4 vo1 ; | 26 | } |
27 | in vec4 vi1; | ||
28 | smooth out vec4 vo1; | ||
27 | void main() { | 29 | void main() { |
28 | gl_Position = vi1; | 30 | gl_Position = vi1; |
29 | vo1 = vi1; | 31 | vo1 = vi1; |
30 | } | 32 | } |
31 | |||
32 | """ | 33 | """ |
33 | , geometryShader = Nothing | 34 | , geometryShader = Nothing |
34 | , fragmentShader = | 35 | , fragmentShader = |
35 | """ | 36 | """ |
36 | #version 330 core | 37 | #version 330 core |
37 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 38 | vec4 texture2D(sampler2D s,vec2 uv) { |
38 | uniform float Time ; | 39 | return texture(s,uv); |
39 | smooth in vec4 vo1 ; | 40 | } |
40 | out vec4 f0 ; | 41 | uniform float Time; |
42 | smooth in vec4 vo1; | ||
43 | out vec4 f0; | ||
41 | void main() { | 44 | void main() { |
42 | f0 = (Time) < (0.5) ? vo1 : vec4 (0.0,0.0,1.0,1.0); | 45 | f0 = (Time) < (0.5) ? vo1 : vec4 (0.0,0.0,1.0,1.0); |
43 | } | 46 | } |
44 | |||
45 | """ | 47 | """ |
46 | } | 48 | } |
47 | ] | 49 | ] |
diff --git a/testdata/fragment07let.out b/testdata/fragment07let.out index dfc9efb0..3d59a3da 100644 --- a/testdata/fragment07let.out +++ b/testdata/fragment07let.out | |||
@@ -21,26 +21,28 @@ Pipeline | |||
21 | , vertexShader = | 21 | , vertexShader = |
22 | """ | 22 | """ |
23 | #version 330 core | 23 | #version 330 core |
24 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 24 | vec4 texture2D(sampler2D s,vec2 uv) { |
25 | in vec4 vi1 ; | 25 | return texture(s,uv); |
26 | smooth out vec4 vo1 ; | 26 | } |
27 | in vec4 vi1; | ||
28 | smooth out vec4 vo1; | ||
27 | void main() { | 29 | void main() { |
28 | gl_Position = vi1; | 30 | gl_Position = vi1; |
29 | vo1 = vi1; | 31 | vo1 = vi1; |
30 | } | 32 | } |
31 | |||
32 | """ | 33 | """ |
33 | , geometryShader = Nothing | 34 | , geometryShader = Nothing |
34 | , fragmentShader = | 35 | , fragmentShader = |
35 | """ | 36 | """ |
36 | #version 330 core | 37 | #version 330 core |
37 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 38 | vec4 texture2D(sampler2D s,vec2 uv) { |
38 | smooth in vec4 vo1 ; | 39 | return texture(s,uv); |
39 | out vec4 f0 ; | 40 | } |
41 | smooth in vec4 vo1; | ||
42 | out vec4 f0; | ||
40 | void main() { | 43 | void main() { |
41 | f0 = sin (sin (vo1)); | 44 | f0 = sin (sin (vo1)); |
42 | } | 45 | } |
43 | |||
44 | """ | 46 | """ |
45 | } | 47 | } |
46 | ] | 48 | ] |
diff --git a/testdata/gfx02.out b/testdata/gfx02.out index 104994a2..e4a79e42 100644 --- a/testdata/gfx02.out +++ b/testdata/gfx02.out | |||
@@ -22,26 +22,28 @@ Pipeline | |||
22 | , vertexShader = | 22 | , vertexShader = |
23 | """ | 23 | """ |
24 | #version 330 core | 24 | #version 330 core |
25 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 25 | vec4 texture2D(sampler2D s,vec2 uv) { |
26 | in vec4 vi1 ; | 26 | return texture(s,uv); |
27 | smooth out vec4 vo1 ; | 27 | } |
28 | in vec4 vi1; | ||
29 | smooth out vec4 vo1; | ||
28 | void main() { | 30 | void main() { |
29 | gl_Position = vi1; | 31 | gl_Position = vi1; |
30 | vo1 = vi1; | 32 | vo1 = vi1; |
31 | } | 33 | } |
32 | |||
33 | """ | 34 | """ |
34 | , geometryShader = Nothing | 35 | , geometryShader = Nothing |
35 | , fragmentShader = | 36 | , fragmentShader = |
36 | """ | 37 | """ |
37 | #version 330 core | 38 | #version 330 core |
38 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 39 | vec4 texture2D(sampler2D s,vec2 uv) { |
39 | smooth in vec4 vo1 ; | 40 | return texture(s,uv); |
40 | out vec4 f0 ; | 41 | } |
42 | smooth in vec4 vo1; | ||
43 | out vec4 f0; | ||
41 | void main() { | 44 | void main() { |
42 | f0 = vo1; | 45 | f0 = vo1; |
43 | } | 46 | } |
44 | |||
45 | """ | 47 | """ |
46 | } | 48 | } |
47 | ] | 49 | ] |
diff --git a/testdata/gfx03.out b/testdata/gfx03.out index 1a963b9a..3ea828c2 100644 --- a/testdata/gfx03.out +++ b/testdata/gfx03.out | |||
@@ -23,24 +23,26 @@ Pipeline | |||
23 | , vertexShader = | 23 | , vertexShader = |
24 | """ | 24 | """ |
25 | #version 330 core | 25 | #version 330 core |
26 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 26 | vec4 texture2D(sampler2D s,vec2 uv) { |
27 | uniform mat4 MVP2 ; | 27 | return texture(s,uv); |
28 | in vec3 vi1 ; | 28 | } |
29 | uniform mat4 MVP2; | ||
30 | in vec3 vi1; | ||
29 | void main() { | 31 | void main() { |
30 | gl_Position = (MVP2) * (vec4 ((vi1).x,(vi1).y,(vi1).z,1.0)); | 32 | gl_Position = (MVP2) * (vec4 ((vi1).x,(vi1).y,(vi1).z,1.0)); |
31 | } | 33 | } |
32 | |||
33 | """ | 34 | """ |
34 | , geometryShader = Nothing | 35 | , geometryShader = Nothing |
35 | , fragmentShader = | 36 | , fragmentShader = |
36 | """ | 37 | """ |
37 | #version 330 core | 38 | #version 330 core |
38 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 39 | vec4 texture2D(sampler2D s,vec2 uv) { |
39 | out vec4 f0 ; | 40 | return texture(s,uv); |
41 | } | ||
42 | out vec4 f0; | ||
40 | void main() { | 43 | void main() { |
41 | f0 = vec4 (0.0,0.4,0.0,1.0); | 44 | f0 = vec4 (0.0,0.4,0.0,1.0); |
42 | } | 45 | } |
43 | |||
44 | """ | 46 | """ |
45 | } | 47 | } |
46 | , Program | 48 | , Program |
@@ -52,27 +54,29 @@ Pipeline | |||
52 | , vertexShader = | 54 | , vertexShader = |
53 | """ | 55 | """ |
54 | #version 330 core | 56 | #version 330 core |
55 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 57 | vec4 texture2D(sampler2D s,vec2 uv) { |
56 | uniform mat4 MVP2 ; | 58 | return texture(s,uv); |
57 | in vec3 vi1 ; | 59 | } |
58 | smooth out vec4 vo1 ; | 60 | uniform mat4 MVP2; |
61 | in vec3 vi1; | ||
62 | smooth out vec4 vo1; | ||
59 | void main() { | 63 | void main() { |
60 | gl_Position = (MVP2) * (vec4 ((vi1).x,(vi1).y,(vi1).z,1.0)); | 64 | gl_Position = (MVP2) * (vec4 ((vi1).x,(vi1).y,(vi1).z,1.0)); |
61 | vo1 = vec4 ((vi1).x,(vi1).y,(vi1).z,1.0); | 65 | vo1 = vec4 ((vi1).x,(vi1).y,(vi1).z,1.0); |
62 | } | 66 | } |
63 | |||
64 | """ | 67 | """ |
65 | , geometryShader = Nothing | 68 | , geometryShader = Nothing |
66 | , fragmentShader = | 69 | , fragmentShader = |
67 | """ | 70 | """ |
68 | #version 330 core | 71 | #version 330 core |
69 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 72 | vec4 texture2D(sampler2D s,vec2 uv) { |
70 | smooth in vec4 vo1 ; | 73 | return texture(s,uv); |
71 | out vec4 f0 ; | 74 | } |
75 | smooth in vec4 vo1; | ||
76 | out vec4 f0; | ||
72 | void main() { | 77 | void main() { |
73 | f0 = (vo1) + (vec4 (1.0,1.4,1.0,0.6)); | 78 | f0 = (vo1) + (vec4 (1.0,1.4,1.0,0.6)); |
74 | } | 79 | } |
75 | |||
76 | """ | 80 | """ |
77 | } | 81 | } |
78 | , Program | 82 | , Program |
@@ -85,27 +89,29 @@ Pipeline | |||
85 | , vertexShader = | 89 | , vertexShader = |
86 | """ | 90 | """ |
87 | #version 330 core | 91 | #version 330 core |
88 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 92 | vec4 texture2D(sampler2D s,vec2 uv) { |
89 | uniform mat4 MVP ; | 93 | return texture(s,uv); |
90 | in vec4 vi1 ; | 94 | } |
91 | flat out vec4 vo1 ; | 95 | uniform mat4 MVP; |
96 | in vec4 vi1; | ||
97 | flat out vec4 vo1; | ||
92 | void main() { | 98 | void main() { |
93 | gl_Position = (MVP) * (vi1); | 99 | gl_Position = (MVP) * (vi1); |
94 | vo1 = vi1; | 100 | vo1 = vi1; |
95 | } | 101 | } |
96 | |||
97 | """ | 102 | """ |
98 | , geometryShader = Nothing | 103 | , geometryShader = Nothing |
99 | , fragmentShader = | 104 | , fragmentShader = |
100 | """ | 105 | """ |
101 | #version 330 core | 106 | #version 330 core |
102 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 107 | vec4 texture2D(sampler2D s,vec2 uv) { |
103 | flat in vec4 vo1 ; | 108 | return texture(s,uv); |
104 | out vec4 f0 ; | 109 | } |
110 | flat in vec4 vo1; | ||
111 | out vec4 f0; | ||
105 | void main() { | 112 | void main() { |
106 | f0 = (vo1) * (vec4 (1.0,1.4,1.0,0.6)); | 113 | f0 = (vo1) * (vec4 (1.0,1.4,1.0,0.6)); |
107 | } | 114 | } |
108 | |||
109 | """ | 115 | """ |
110 | } | 116 | } |
111 | ] | 117 | ] |
diff --git a/testdata/gfx04.out b/testdata/gfx04.out index b67504c5..68bb0e52 100644 --- a/testdata/gfx04.out +++ b/testdata/gfx04.out | |||
@@ -26,28 +26,30 @@ Pipeline | |||
26 | , vertexShader = | 26 | , vertexShader = |
27 | """ | 27 | """ |
28 | #version 330 core | 28 | #version 330 core |
29 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 29 | vec4 texture2D(sampler2D s,vec2 uv) { |
30 | uniform mat4 MVP ; | 30 | return texture(s,uv); |
31 | in vec3 vi1 ; | 31 | } |
32 | in vec3 vi2 ; | 32 | uniform mat4 MVP; |
33 | smooth out vec4 vo1 ; | 33 | in vec3 vi1; |
34 | in vec3 vi2; | ||
35 | smooth out vec4 vo1; | ||
34 | void main() { | 36 | void main() { |
35 | gl_Position = (MVP) * (vec4 ((vi1).x,(vi1).y,(vi1).z,1.0)); | 37 | gl_Position = (MVP) * (vec4 ((vi1).x,(vi1).y,(vi1).z,1.0)); |
36 | vo1 = vec4 ((vi2).x,(vi2).y,(vi2).z,1.0); | 38 | vo1 = vec4 ((vi2).x,(vi2).y,(vi2).z,1.0); |
37 | } | 39 | } |
38 | |||
39 | """ | 40 | """ |
40 | , geometryShader = Nothing | 41 | , geometryShader = Nothing |
41 | , fragmentShader = | 42 | , fragmentShader = |
42 | """ | 43 | """ |
43 | #version 330 core | 44 | #version 330 core |
44 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 45 | vec4 texture2D(sampler2D s,vec2 uv) { |
45 | smooth in vec4 vo1 ; | 46 | return texture(s,uv); |
46 | out vec4 f0 ; | 47 | } |
48 | smooth in vec4 vo1; | ||
49 | out vec4 f0; | ||
47 | void main() { | 50 | void main() { |
48 | f0 = (vo1) * (vec4 (1.0,1.4,1.0,0.6)); | 51 | f0 = (vo1) * (vec4 (1.0,1.4,1.0,0.6)); |
49 | } | 52 | } |
50 | |||
51 | """ | 53 | """ |
52 | } | 54 | } |
53 | ] | 55 | ] |
diff --git a/testdata/gfx05.out b/testdata/gfx05.out index f477997f..b7ce4002 100644 --- a/testdata/gfx05.out +++ b/testdata/gfx05.out | |||
@@ -76,24 +76,26 @@ Pipeline | |||
76 | , vertexShader = | 76 | , vertexShader = |
77 | """ | 77 | """ |
78 | #version 330 core | 78 | #version 330 core |
79 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 79 | vec4 texture2D(sampler2D s,vec2 uv) { |
80 | uniform mat4 MVP2 ; | 80 | return texture(s,uv); |
81 | in vec3 vi1 ; | 81 | } |
82 | uniform mat4 MVP2; | ||
83 | in vec3 vi1; | ||
82 | void main() { | 84 | void main() { |
83 | gl_Position = (MVP2) * (vec4 ((vi1).x,(vi1).y,(vi1).z,1.0)); | 85 | gl_Position = (MVP2) * (vec4 ((vi1).x,(vi1).y,(vi1).z,1.0)); |
84 | } | 86 | } |
85 | |||
86 | """ | 87 | """ |
87 | , geometryShader = Nothing | 88 | , geometryShader = Nothing |
88 | , fragmentShader = | 89 | , fragmentShader = |
89 | """ | 90 | """ |
90 | #version 330 core | 91 | #version 330 core |
91 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 92 | vec4 texture2D(sampler2D s,vec2 uv) { |
92 | out vec4 f0 ; | 93 | return texture(s,uv); |
94 | } | ||
95 | out vec4 f0; | ||
93 | void main() { | 96 | void main() { |
94 | f0 = vec4 (0.0,0.4,0.0,1.0); | 97 | f0 = vec4 (0.0,0.4,0.0,1.0); |
95 | } | 98 | } |
96 | |||
97 | """ | 99 | """ |
98 | } | 100 | } |
99 | , Program | 101 | , Program |
@@ -105,27 +107,29 @@ Pipeline | |||
105 | , vertexShader = | 107 | , vertexShader = |
106 | """ | 108 | """ |
107 | #version 330 core | 109 | #version 330 core |
108 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 110 | vec4 texture2D(sampler2D s,vec2 uv) { |
109 | uniform mat4 MVP2 ; | 111 | return texture(s,uv); |
110 | in vec3 vi1 ; | 112 | } |
111 | smooth out vec4 vo1 ; | 113 | uniform mat4 MVP2; |
114 | in vec3 vi1; | ||
115 | smooth out vec4 vo1; | ||
112 | void main() { | 116 | void main() { |
113 | gl_Position = (MVP2) * (vec4 ((vi1).x,(vi1).y,(vi1).z,1.0)); | 117 | gl_Position = (MVP2) * (vec4 ((vi1).x,(vi1).y,(vi1).z,1.0)); |
114 | vo1 = vec4 ((vi1).x,(vi1).y,(vi1).z,1.0); | 118 | vo1 = vec4 ((vi1).x,(vi1).y,(vi1).z,1.0); |
115 | } | 119 | } |
116 | |||
117 | """ | 120 | """ |
118 | , geometryShader = Nothing | 121 | , geometryShader = Nothing |
119 | , fragmentShader = | 122 | , fragmentShader = |
120 | """ | 123 | """ |
121 | #version 330 core | 124 | #version 330 core |
122 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 125 | vec4 texture2D(sampler2D s,vec2 uv) { |
123 | smooth in vec4 vo1 ; | 126 | return texture(s,uv); |
124 | out vec4 f0 ; | 127 | } |
128 | smooth in vec4 vo1; | ||
129 | out vec4 f0; | ||
125 | void main() { | 130 | void main() { |
126 | f0 = (vo1) + (vec4 (1.0,1.4,1.0,0.6)); | 131 | f0 = (vo1) + (vec4 (1.0,1.4,1.0,0.6)); |
127 | } | 132 | } |
128 | |||
129 | """ | 133 | """ |
130 | } | 134 | } |
131 | , Program | 135 | , Program |
@@ -137,24 +141,26 @@ Pipeline | |||
137 | , vertexShader = | 141 | , vertexShader = |
138 | """ | 142 | """ |
139 | #version 330 core | 143 | #version 330 core |
140 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 144 | vec4 texture2D(sampler2D s,vec2 uv) { |
141 | uniform mat4 MVP2 ; | 145 | return texture(s,uv); |
142 | in vec3 vi1 ; | 146 | } |
147 | uniform mat4 MVP2; | ||
148 | in vec3 vi1; | ||
143 | void main() { | 149 | void main() { |
144 | gl_Position = (MVP2) * (vec4 ((vi1).x,(vi1).y,(vi1).z,1.0)); | 150 | gl_Position = (MVP2) * (vec4 ((vi1).x,(vi1).y,(vi1).z,1.0)); |
145 | } | 151 | } |
146 | |||
147 | """ | 152 | """ |
148 | , geometryShader = Nothing | 153 | , geometryShader = Nothing |
149 | , fragmentShader = | 154 | , fragmentShader = |
150 | """ | 155 | """ |
151 | #version 330 core | 156 | #version 330 core |
152 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 157 | vec4 texture2D(sampler2D s,vec2 uv) { |
153 | out vec4 f0 ; | 158 | return texture(s,uv); |
159 | } | ||
160 | out vec4 f0; | ||
154 | void main() { | 161 | void main() { |
155 | f0 = vec4 (0.0,0.4,0.0,1.0); | 162 | f0 = vec4 (0.0,0.4,0.0,1.0); |
156 | } | 163 | } |
157 | |||
158 | """ | 164 | """ |
159 | } | 165 | } |
160 | , Program | 166 | , Program |
@@ -169,29 +175,31 @@ Pipeline | |||
169 | , vertexShader = | 175 | , vertexShader = |
170 | """ | 176 | """ |
171 | #version 330 core | 177 | #version 330 core |
172 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 178 | vec4 texture2D(sampler2D s,vec2 uv) { |
173 | uniform mat4 MVP ; | 179 | return texture(s,uv); |
174 | in vec4 vi1 ; | 180 | } |
175 | in vec2 vi2 ; | 181 | uniform mat4 MVP; |
176 | smooth out vec2 vo1 ; | 182 | in vec4 vi1; |
183 | in vec2 vi2; | ||
184 | smooth out vec2 vo1; | ||
177 | void main() { | 185 | void main() { |
178 | gl_Position = (MVP) * (vi1); | 186 | gl_Position = (MVP) * (vi1); |
179 | vo1 = vi2; | 187 | vo1 = vi2; |
180 | } | 188 | } |
181 | |||
182 | """ | 189 | """ |
183 | , geometryShader = Nothing | 190 | , geometryShader = Nothing |
184 | , fragmentShader = | 191 | , fragmentShader = |
185 | """ | 192 | """ |
186 | #version 330 core | 193 | #version 330 core |
187 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 194 | vec4 texture2D(sampler2D s,vec2 uv) { |
188 | uniform sampler2D s0 ; | 195 | return texture(s,uv); |
189 | smooth in vec2 vo1 ; | 196 | } |
190 | out vec4 f0 ; | 197 | uniform sampler2D s0; |
198 | smooth in vec2 vo1; | ||
199 | out vec4 f0; | ||
191 | void main() { | 200 | void main() { |
192 | f0 = (texture2D (s0,(vo1).xy)) * (0.7); | 201 | f0 = (texture2D (s0,(vo1).xy)) * (0.7); |
193 | } | 202 | } |
194 | |||
195 | """ | 203 | """ |
196 | } | 204 | } |
197 | ] | 205 | ] |
diff --git a/testdata/heartbeat01.out b/testdata/heartbeat01.out index d40dc6d6..64a3d97b 100644 --- a/testdata/heartbeat01.out +++ b/testdata/heartbeat01.out | |||
@@ -79,49 +79,52 @@ Pipeline | |||
79 | , vertexShader = | 79 | , vertexShader = |
80 | """ | 80 | """ |
81 | #version 330 core | 81 | #version 330 core |
82 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 82 | vec4 texture2D(sampler2D s,vec2 uv) { |
83 | in vec4 vi1 ; | 83 | return texture(s,uv); |
84 | in vec2 vi2 ; | 84 | } |
85 | smooth out vec2 vo1 ; | 85 | in vec4 vi1; |
86 | in vec2 vi2; | ||
87 | smooth out vec2 vo1; | ||
86 | void main() { | 88 | void main() { |
87 | gl_Position = (vi1) * (vec4 (1.0,1.0,1.0,1.0)); | 89 | gl_Position = (vi1) * (vec4 (1.0,1.0,1.0,1.0)); |
88 | vo1 = vi2; | 90 | vo1 = vi2; |
89 | } | 91 | } |
90 | |||
91 | """ | 92 | """ |
92 | , geometryShader = Nothing | 93 | , geometryShader = Nothing |
93 | , fragmentShader = | 94 | , fragmentShader = |
94 | """ | 95 | """ |
95 | #version 330 core | 96 | #version 330 core |
96 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 97 | vec4 texture2D(sampler2D s,vec2 uv) { |
97 | uniform float Time ; | 98 | return texture(s,uv); |
98 | smooth in vec2 vo1 ; | 99 | } |
99 | out vec4 f0 ; | 100 | uniform float Time; |
101 | smooth in vec2 vo1; | ||
102 | out vec4 f0; | ||
100 | void main() { | 103 | void main() { |
101 | f0 = ((((((vo1).x) - (0.85)) * (((vo1).x) - (0.85))) + ((((vo1).y) - (0.85)) * (((vo1).y) - (0.85)))) + ((5.0e-4) * (sin | 104 | f0 = |
102 | (((3.0) * (atan | 105 | ((((((vo1).x) - (0.85)) * (((vo1).x) - (0.85))) + ((((vo1).y) - (0.85)) * (((vo1).y) - (0.85)))) + ((5.0e-4) * (sin |
103 | (((vo1).x) - (0.85) | 106 | (((3.0) * (atan |
104 | ,((vo1).y) - (0.85)))) + ((15.0) * (Time)))))) < ((5.0e-3) * (abs | 107 | (((vo1).x) - (0.85) |
105 | ((sin ((Time) * (4.0))) - (0.37)))) ? vec4 | 108 | ,((vo1).y) - (0.85)))) + ((15.0) * (Time)))))) < ((5.0e-3) * (abs |
106 | (0.0 | 109 | ((sin ((Time) * (4.0))) - (0.37)))) ? vec4 |
107 | ,0.0 | 110 | (0.0 |
108 | ,0.5 | 111 | ,0.0 |
109 | ,1.0) : ((((((vo1).x) - (0.85)) * (((vo1).x) - (0.85))) + ((((vo1).y) - (0.85)) * (((vo1).y) - (0.85)))) + ((2.0e-3) * (sin | 112 | ,0.5 |
110 | (((5.0) * (atan | 113 | ,1.0) : ((((((vo1).x) - (0.85)) * (((vo1).x) - (0.85))) + ((((vo1).y) - (0.85)) * (((vo1).y) - (0.85)))) + ((2.0e-3) * (sin |
111 | (((vo1).x) - (0.85) | 114 | (((5.0) * (atan |
112 | ,((vo1).y) - (0.85)))) - ((5.0) * (Time)))))) < ((2.0e-2) * (abs | 115 | (((vo1).x) - (0.85) |
113 | ((sin ((Time) * (4.0))) - (0.37)))) ? vec4 | 116 | ,((vo1).y) - (0.85)))) - ((5.0) * (Time)))))) < ((2.0e-2) * (abs |
114 | (0.0 | 117 | ((sin ((Time) * (4.0))) - (0.37)))) ? vec4 |
115 | ,0.0 | 118 | (0.0 |
116 | ,1.0 | 119 | ,0.0 |
117 | ,1.0) : ((((((vo1).x) - (0.85)) * (((vo1).x) - (0.85))) + ((((vo1).y) - (0.85)) * (((vo1).y) - (0.85)))) + ((2.0e-3) * (sin | 120 | ,1.0 |
118 | (((7.0) * (atan | 121 | ,1.0) : ((((((vo1).x) - (0.85)) * (((vo1).x) - (0.85))) + ((((vo1).y) - (0.85)) * (((vo1).y) - (0.85)))) + ((2.0e-3) * (sin |
119 | (((vo1).x) - (0.85) | 122 | (((7.0) * (atan |
120 | ,((vo1).y) - (0.85)))) + ((3.0) * (Time)))))) < ((5.0e-2) * (abs | 123 | (((vo1).x) - (0.85) |
121 | ((sin ((Time) * (4.0))) - (0.37)))) ? vec4 | 124 | ,((vo1).y) - (0.85)))) + ((3.0) * (Time)))))) < ((5.0e-2) * (abs |
122 | (1.0,1.0,1.0,1.0) : vec4 (1.0,1.0,0.0,1.0); | 125 | ((sin ((Time) * (4.0))) - (0.37)))) ? vec4 |
126 | (1.0,1.0,1.0,1.0) : vec4 (1.0,1.0,0.0,1.0); | ||
123 | } | 127 | } |
124 | |||
125 | """ | 128 | """ |
126 | } | 129 | } |
127 | , Program | 130 | , Program |
@@ -136,29 +139,31 @@ Pipeline | |||
136 | , vertexShader = | 139 | , vertexShader = |
137 | """ | 140 | """ |
138 | #version 330 core | 141 | #version 330 core |
139 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 142 | vec4 texture2D(sampler2D s,vec2 uv) { |
140 | uniform mat4 MVP ; | 143 | return texture(s,uv); |
141 | in vec4 vi1 ; | 144 | } |
142 | in vec2 vi2 ; | 145 | uniform mat4 MVP; |
143 | smooth out vec2 vo1 ; | 146 | in vec4 vi1; |
147 | in vec2 vi2; | ||
148 | smooth out vec2 vo1; | ||
144 | void main() { | 149 | void main() { |
145 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); | 150 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); |
146 | vo1 = vi2; | 151 | vo1 = vi2; |
147 | } | 152 | } |
148 | |||
149 | """ | 153 | """ |
150 | , geometryShader = Nothing | 154 | , geometryShader = Nothing |
151 | , fragmentShader = | 155 | , fragmentShader = |
152 | """ | 156 | """ |
153 | #version 330 core | 157 | #version 330 core |
154 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 158 | vec4 texture2D(sampler2D s,vec2 uv) { |
155 | uniform sampler2D s0 ; | 159 | return texture(s,uv); |
156 | smooth in vec2 vo1 ; | 160 | } |
157 | out vec4 f0 ; | 161 | uniform sampler2D s0; |
162 | smooth in vec2 vo1; | ||
163 | out vec4 f0; | ||
158 | void main() { | 164 | void main() { |
159 | f0 = texture2D (s0,vo1); | 165 | f0 = texture2D (s0,vo1); |
160 | } | 166 | } |
161 | |||
162 | """ | 167 | """ |
163 | } | 168 | } |
164 | ] | 169 | ] |
diff --git a/testdata/helloWorld.out b/testdata/helloWorld.out index 9da473c4..13e7377a 100644 --- a/testdata/helloWorld.out +++ b/testdata/helloWorld.out | |||
@@ -24,28 +24,30 @@ Pipeline | |||
24 | , vertexShader = | 24 | , vertexShader = |
25 | """ | 25 | """ |
26 | #version 330 core | 26 | #version 330 core |
27 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 27 | vec4 texture2D(sampler2D s,vec2 uv) { |
28 | uniform mat4 MVP ; | 28 | return texture(s,uv); |
29 | in vec4 vi1 ; | 29 | } |
30 | smooth out vec4 vo1 ; | 30 | uniform mat4 MVP; |
31 | in vec4 vi1; | ||
32 | smooth out vec4 vo1; | ||
31 | void main() { | 33 | void main() { |
32 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); | 34 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); |
33 | vo1 = vi1; | 35 | vo1 = vi1; |
34 | } | 36 | } |
35 | |||
36 | """ | 37 | """ |
37 | , geometryShader = Nothing | 38 | , geometryShader = Nothing |
38 | , fragmentShader = | 39 | , fragmentShader = |
39 | """ | 40 | """ |
40 | #version 330 core | 41 | #version 330 core |
41 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 42 | vec4 texture2D(sampler2D s,vec2 uv) { |
42 | smooth in vec4 vo1 ; | 43 | return texture(s,uv); |
43 | out vec4 f0 ; | 44 | } |
45 | smooth in vec4 vo1; | ||
46 | out vec4 f0; | ||
44 | void main() { | 47 | void main() { |
45 | if (!(true)) discard; | 48 | if (!(true)) discard; |
46 | f0 = vo1; | 49 | f0 = vo1; |
47 | } | 50 | } |
48 | |||
49 | """ | 51 | """ |
50 | } | 52 | } |
51 | ] | 53 | ] |
diff --git a/testdata/line01.out b/testdata/line01.out index 66c0aebb..6ea03c7f 100644 --- a/testdata/line01.out +++ b/testdata/line01.out | |||
@@ -24,28 +24,30 @@ Pipeline | |||
24 | , vertexShader = | 24 | , vertexShader = |
25 | """ | 25 | """ |
26 | #version 330 core | 26 | #version 330 core |
27 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 27 | vec4 texture2D(sampler2D s,vec2 uv) { |
28 | uniform mat4 MVP ; | 28 | return texture(s,uv); |
29 | in vec3 vi1 ; | 29 | } |
30 | smooth out vec4 vo1 ; | 30 | uniform mat4 MVP; |
31 | in vec3 vi1; | ||
32 | smooth out vec4 vo1; | ||
31 | void main() { | 33 | void main() { |
32 | gl_Position = ((MVP) * (vec4 | 34 | gl_Position = ((MVP) * (vec4 |
33 | ((vi1).x,(vi1).y,(vi1).z,1.0))) * (vec4 (0.5,0.5,0.5,1.0)); | 35 | ((vi1).x,(vi1).y,(vi1).z,1.0))) * (vec4 (0.5,0.5,0.5,1.0)); |
34 | vo1 = vec4 ((vi1).x,(vi1).y,(vi1).z,1.0); | 36 | vo1 = vec4 ((vi1).x,(vi1).y,(vi1).z,1.0); |
35 | } | 37 | } |
36 | |||
37 | """ | 38 | """ |
38 | , geometryShader = Nothing | 39 | , geometryShader = Nothing |
39 | , fragmentShader = | 40 | , fragmentShader = |
40 | """ | 41 | """ |
41 | #version 330 core | 42 | #version 330 core |
42 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 43 | vec4 texture2D(sampler2D s,vec2 uv) { |
43 | smooth in vec4 vo1 ; | 44 | return texture(s,uv); |
44 | out vec4 f0 ; | 45 | } |
46 | smooth in vec4 vo1; | ||
47 | out vec4 f0; | ||
45 | void main() { | 48 | void main() { |
46 | f0 = vo1; | 49 | f0 = vo1; |
47 | } | 50 | } |
48 | |||
49 | """ | 51 | """ |
50 | } | 52 | } |
51 | ] | 53 | ] |
diff --git a/testdata/point01.out b/testdata/point01.out index 269277a7..7eddbc45 100644 --- a/testdata/point01.out +++ b/testdata/point01.out | |||
@@ -26,30 +26,32 @@ Pipeline | |||
26 | , vertexShader = | 26 | , vertexShader = |
27 | """ | 27 | """ |
28 | #version 330 core | 28 | #version 330 core |
29 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 29 | vec4 texture2D(sampler2D s,vec2 uv) { |
30 | uniform mat4 MVP ; | 30 | return texture(s,uv); |
31 | in vec3 vi1 ; | 31 | } |
32 | in vec4 vi2 ; | 32 | uniform mat4 MVP; |
33 | smooth out vec4 vo1 ; | 33 | in vec3 vi1; |
34 | in vec4 vi2; | ||
35 | smooth out vec4 vo1; | ||
34 | void main() { | 36 | void main() { |
35 | gl_Position = ((MVP) * (vec4 | 37 | gl_Position = ((MVP) * (vec4 |
36 | ((vi1).x,(vi1).y,(vi1).z,1.0))) * (vec4 (0.5,0.5,0.5,1.0)); | 38 | ((vi1).x,(vi1).y,(vi1).z,1.0))) * (vec4 (0.5,0.5,0.5,1.0)); |
37 | vo1 = vi2; | 39 | vo1 = vi2; |
38 | gl_PointSize = 30.0; | 40 | gl_PointSize = 30.0; |
39 | } | 41 | } |
40 | |||
41 | """ | 42 | """ |
42 | , geometryShader = Nothing | 43 | , geometryShader = Nothing |
43 | , fragmentShader = | 44 | , fragmentShader = |
44 | """ | 45 | """ |
45 | #version 330 core | 46 | #version 330 core |
46 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 47 | vec4 texture2D(sampler2D s,vec2 uv) { |
47 | smooth in vec4 vo1 ; | 48 | return texture(s,uv); |
48 | out vec4 f0 ; | 49 | } |
50 | smooth in vec4 vo1; | ||
51 | out vec4 f0; | ||
49 | void main() { | 52 | void main() { |
50 | f0 = vo1; | 53 | f0 = vo1; |
51 | } | 54 | } |
52 | |||
53 | """ | 55 | """ |
54 | } | 56 | } |
55 | ] | 57 | ] |
diff --git a/testdata/recursivetexture02.out b/testdata/recursivetexture02.out index 4e9e1953..0dc86bbb 100644 --- a/testdata/recursivetexture02.out +++ b/testdata/recursivetexture02.out | |||
@@ -287,28 +287,30 @@ Pipeline | |||
287 | , vertexShader = | 287 | , vertexShader = |
288 | """ | 288 | """ |
289 | #version 330 core | 289 | #version 330 core |
290 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 290 | vec4 texture2D(sampler2D s,vec2 uv) { |
291 | uniform mat4 MVP ; | 291 | return texture(s,uv); |
292 | in vec4 vi1 ; | 292 | } |
293 | in vec2 vi2 ; | 293 | uniform mat4 MVP; |
294 | smooth out vec2 vo1 ; | 294 | in vec4 vi1; |
295 | in vec2 vi2; | ||
296 | smooth out vec2 vo1; | ||
295 | void main() { | 297 | void main() { |
296 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); | 298 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); |
297 | vo1 = vi2; | 299 | vo1 = vi2; |
298 | } | 300 | } |
299 | |||
300 | """ | 301 | """ |
301 | , geometryShader = Nothing | 302 | , geometryShader = Nothing |
302 | , fragmentShader = | 303 | , fragmentShader = |
303 | """ | 304 | """ |
304 | #version 330 core | 305 | #version 330 core |
305 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 306 | vec4 texture2D(sampler2D s,vec2 uv) { |
306 | smooth in vec2 vo1 ; | 307 | return texture(s,uv); |
307 | out vec4 f0 ; | 308 | } |
309 | smooth in vec2 vo1; | ||
310 | out vec4 f0; | ||
308 | void main() { | 311 | void main() { |
309 | f0 = (vo1).xyxy; | 312 | f0 = (vo1).xyxy; |
310 | } | 313 | } |
311 | |||
312 | """ | 314 | """ |
313 | } | 315 | } |
314 | , Program | 316 | , Program |
@@ -323,29 +325,31 @@ Pipeline | |||
323 | , vertexShader = | 325 | , vertexShader = |
324 | """ | 326 | """ |
325 | #version 330 core | 327 | #version 330 core |
326 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 328 | vec4 texture2D(sampler2D s,vec2 uv) { |
327 | uniform mat4 MVP ; | 329 | return texture(s,uv); |
328 | in vec4 vi1 ; | 330 | } |
329 | in vec2 vi2 ; | 331 | uniform mat4 MVP; |
330 | smooth out vec2 vo1 ; | 332 | in vec4 vi1; |
333 | in vec2 vi2; | ||
334 | smooth out vec2 vo1; | ||
331 | void main() { | 335 | void main() { |
332 | gl_Position = ((MVP) * (vi1)) * (vec4 (1.0,1.0,1.0,1.0)); | 336 | gl_Position = ((MVP) * (vi1)) * (vec4 (1.0,1.0,1.0,1.0)); |
333 | vo1 = vi2; | 337 | vo1 = vi2; |
334 | } | 338 | } |
335 | |||
336 | """ | 339 | """ |
337 | , geometryShader = Nothing | 340 | , geometryShader = Nothing |
338 | , fragmentShader = | 341 | , fragmentShader = |
339 | """ | 342 | """ |
340 | #version 330 core | 343 | #version 330 core |
341 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 344 | vec4 texture2D(sampler2D s,vec2 uv) { |
342 | uniform sampler2D s0 ; | 345 | return texture(s,uv); |
343 | smooth in vec2 vo1 ; | 346 | } |
344 | out vec4 f0 ; | 347 | uniform sampler2D s0; |
348 | smooth in vec2 vo1; | ||
349 | out vec4 f0; | ||
345 | void main() { | 350 | void main() { |
346 | f0 = (texture2D (s0,vo1)) * (vec4 (0.7,0.7,0.7,1.0)); | 351 | f0 = (texture2D (s0,vo1)) * (vec4 (0.7,0.7,0.7,1.0)); |
347 | } | 352 | } |
348 | |||
349 | """ | 353 | """ |
350 | } | 354 | } |
351 | , Program | 355 | , Program |
@@ -360,29 +364,31 @@ Pipeline | |||
360 | , vertexShader = | 364 | , vertexShader = |
361 | """ | 365 | """ |
362 | #version 330 core | 366 | #version 330 core |
363 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 367 | vec4 texture2D(sampler2D s,vec2 uv) { |
364 | uniform mat4 MVP ; | 368 | return texture(s,uv); |
365 | in vec4 vi1 ; | 369 | } |
366 | in vec2 vi2 ; | 370 | uniform mat4 MVP; |
367 | smooth out vec2 vo1 ; | 371 | in vec4 vi1; |
372 | in vec2 vi2; | ||
373 | smooth out vec2 vo1; | ||
368 | void main() { | 374 | void main() { |
369 | gl_Position = ((MVP) * (vi1)) * (vec4 (1.0,1.0,1.0,1.0)); | 375 | gl_Position = ((MVP) * (vi1)) * (vec4 (1.0,1.0,1.0,1.0)); |
370 | vo1 = vi2; | 376 | vo1 = vi2; |
371 | } | 377 | } |
372 | |||
373 | """ | 378 | """ |
374 | , geometryShader = Nothing | 379 | , geometryShader = Nothing |
375 | , fragmentShader = | 380 | , fragmentShader = |
376 | """ | 381 | """ |
377 | #version 330 core | 382 | #version 330 core |
378 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 383 | vec4 texture2D(sampler2D s,vec2 uv) { |
379 | uniform sampler2D s0 ; | 384 | return texture(s,uv); |
380 | smooth in vec2 vo1 ; | 385 | } |
381 | out vec4 f0 ; | 386 | uniform sampler2D s0; |
387 | smooth in vec2 vo1; | ||
388 | out vec4 f0; | ||
382 | void main() { | 389 | void main() { |
383 | f0 = (texture2D (s0,vo1)) * (vec4 (0.7,0.7,0.7,1.0)); | 390 | f0 = (texture2D (s0,vo1)) * (vec4 (0.7,0.7,0.7,1.0)); |
384 | } | 391 | } |
385 | |||
386 | """ | 392 | """ |
387 | } | 393 | } |
388 | , Program | 394 | , Program |
@@ -397,29 +403,31 @@ Pipeline | |||
397 | , vertexShader = | 403 | , vertexShader = |
398 | """ | 404 | """ |
399 | #version 330 core | 405 | #version 330 core |
400 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 406 | vec4 texture2D(sampler2D s,vec2 uv) { |
401 | uniform mat4 MVP ; | 407 | return texture(s,uv); |
402 | in vec4 vi1 ; | 408 | } |
403 | in vec2 vi2 ; | 409 | uniform mat4 MVP; |
404 | smooth out vec2 vo1 ; | 410 | in vec4 vi1; |
411 | in vec2 vi2; | ||
412 | smooth out vec2 vo1; | ||
405 | void main() { | 413 | void main() { |
406 | gl_Position = ((MVP) * (vi1)) * (vec4 (1.0,1.0,1.0,1.0)); | 414 | gl_Position = ((MVP) * (vi1)) * (vec4 (1.0,1.0,1.0,1.0)); |
407 | vo1 = vi2; | 415 | vo1 = vi2; |
408 | } | 416 | } |
409 | |||
410 | """ | 417 | """ |
411 | , geometryShader = Nothing | 418 | , geometryShader = Nothing |
412 | , fragmentShader = | 419 | , fragmentShader = |
413 | """ | 420 | """ |
414 | #version 330 core | 421 | #version 330 core |
415 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 422 | vec4 texture2D(sampler2D s,vec2 uv) { |
416 | uniform sampler2D s0 ; | 423 | return texture(s,uv); |
417 | smooth in vec2 vo1 ; | 424 | } |
418 | out vec4 f0 ; | 425 | uniform sampler2D s0; |
426 | smooth in vec2 vo1; | ||
427 | out vec4 f0; | ||
419 | void main() { | 428 | void main() { |
420 | f0 = (texture2D (s0,vo1)) * (vec4 (0.7,0.7,0.7,1.0)); | 429 | f0 = (texture2D (s0,vo1)) * (vec4 (0.7,0.7,0.7,1.0)); |
421 | } | 430 | } |
422 | |||
423 | """ | 431 | """ |
424 | } | 432 | } |
425 | , Program | 433 | , Program |
@@ -434,29 +442,31 @@ Pipeline | |||
434 | , vertexShader = | 442 | , vertexShader = |
435 | """ | 443 | """ |
436 | #version 330 core | 444 | #version 330 core |
437 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 445 | vec4 texture2D(sampler2D s,vec2 uv) { |
438 | uniform mat4 MVP ; | 446 | return texture(s,uv); |
439 | in vec4 vi1 ; | 447 | } |
440 | in vec2 vi2 ; | 448 | uniform mat4 MVP; |
441 | smooth out vec2 vo1 ; | 449 | in vec4 vi1; |
450 | in vec2 vi2; | ||
451 | smooth out vec2 vo1; | ||
442 | void main() { | 452 | void main() { |
443 | gl_Position = ((MVP) * (vi1)) * (vec4 (1.0,1.0,1.0,1.0)); | 453 | gl_Position = ((MVP) * (vi1)) * (vec4 (1.0,1.0,1.0,1.0)); |
444 | vo1 = vi2; | 454 | vo1 = vi2; |
445 | } | 455 | } |
446 | |||
447 | """ | 456 | """ |
448 | , geometryShader = Nothing | 457 | , geometryShader = Nothing |
449 | , fragmentShader = | 458 | , fragmentShader = |
450 | """ | 459 | """ |
451 | #version 330 core | 460 | #version 330 core |
452 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 461 | vec4 texture2D(sampler2D s,vec2 uv) { |
453 | uniform sampler2D s0 ; | 462 | return texture(s,uv); |
454 | smooth in vec2 vo1 ; | 463 | } |
455 | out vec4 f0 ; | 464 | uniform sampler2D s0; |
465 | smooth in vec2 vo1; | ||
466 | out vec4 f0; | ||
456 | void main() { | 467 | void main() { |
457 | f0 = (texture2D (s0,vo1)) * (vec4 (0.7,0.7,0.7,1.0)); | 468 | f0 = (texture2D (s0,vo1)) * (vec4 (0.7,0.7,0.7,1.0)); |
458 | } | 469 | } |
459 | |||
460 | """ | 470 | """ |
461 | } | 471 | } |
462 | , Program | 472 | , Program |
@@ -471,29 +481,31 @@ Pipeline | |||
471 | , vertexShader = | 481 | , vertexShader = |
472 | """ | 482 | """ |
473 | #version 330 core | 483 | #version 330 core |
474 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 484 | vec4 texture2D(sampler2D s,vec2 uv) { |
475 | uniform mat4 MVP ; | 485 | return texture(s,uv); |
476 | in vec4 vi1 ; | 486 | } |
477 | in vec2 vi2 ; | 487 | uniform mat4 MVP; |
478 | smooth out vec2 vo1 ; | 488 | in vec4 vi1; |
489 | in vec2 vi2; | ||
490 | smooth out vec2 vo1; | ||
479 | void main() { | 491 | void main() { |
480 | gl_Position = ((MVP) * (vi1)) * (vec4 (1.0,1.0,1.0,1.0)); | 492 | gl_Position = ((MVP) * (vi1)) * (vec4 (1.0,1.0,1.0,1.0)); |
481 | vo1 = vi2; | 493 | vo1 = vi2; |
482 | } | 494 | } |
483 | |||
484 | """ | 495 | """ |
485 | , geometryShader = Nothing | 496 | , geometryShader = Nothing |
486 | , fragmentShader = | 497 | , fragmentShader = |
487 | """ | 498 | """ |
488 | #version 330 core | 499 | #version 330 core |
489 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 500 | vec4 texture2D(sampler2D s,vec2 uv) { |
490 | uniform sampler2D s0 ; | 501 | return texture(s,uv); |
491 | smooth in vec2 vo1 ; | 502 | } |
492 | out vec4 f0 ; | 503 | uniform sampler2D s0; |
504 | smooth in vec2 vo1; | ||
505 | out vec4 f0; | ||
493 | void main() { | 506 | void main() { |
494 | f0 = (texture2D (s0,vo1)) * (vec4 (0.7,0.7,0.7,1.0)); | 507 | f0 = (texture2D (s0,vo1)) * (vec4 (0.7,0.7,0.7,1.0)); |
495 | } | 508 | } |
496 | |||
497 | """ | 509 | """ |
498 | } | 510 | } |
499 | ] | 511 | ] |
diff --git a/testdata/reduce01.out b/testdata/reduce01.out index 104994a2..e4a79e42 100644 --- a/testdata/reduce01.out +++ b/testdata/reduce01.out | |||
@@ -22,26 +22,28 @@ Pipeline | |||
22 | , vertexShader = | 22 | , vertexShader = |
23 | """ | 23 | """ |
24 | #version 330 core | 24 | #version 330 core |
25 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 25 | vec4 texture2D(sampler2D s,vec2 uv) { |
26 | in vec4 vi1 ; | 26 | return texture(s,uv); |
27 | smooth out vec4 vo1 ; | 27 | } |
28 | in vec4 vi1; | ||
29 | smooth out vec4 vo1; | ||
28 | void main() { | 30 | void main() { |
29 | gl_Position = vi1; | 31 | gl_Position = vi1; |
30 | vo1 = vi1; | 32 | vo1 = vi1; |
31 | } | 33 | } |
32 | |||
33 | """ | 34 | """ |
34 | , geometryShader = Nothing | 35 | , geometryShader = Nothing |
35 | , fragmentShader = | 36 | , fragmentShader = |
36 | """ | 37 | """ |
37 | #version 330 core | 38 | #version 330 core |
38 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 39 | vec4 texture2D(sampler2D s,vec2 uv) { |
39 | smooth in vec4 vo1 ; | 40 | return texture(s,uv); |
40 | out vec4 f0 ; | 41 | } |
42 | smooth in vec4 vo1; | ||
43 | out vec4 f0; | ||
41 | void main() { | 44 | void main() { |
42 | f0 = vo1; | 45 | f0 = vo1; |
43 | } | 46 | } |
44 | |||
45 | """ | 47 | """ |
46 | } | 48 | } |
47 | ] | 49 | ] |
diff --git a/testdata/reduce05.out b/testdata/reduce05.out index b3cd59c2..98edf765 100644 --- a/testdata/reduce05.out +++ b/testdata/reduce05.out | |||
@@ -22,26 +22,28 @@ Pipeline | |||
22 | , vertexShader = | 22 | , vertexShader = |
23 | """ | 23 | """ |
24 | #version 330 core | 24 | #version 330 core |
25 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 25 | vec4 texture2D(sampler2D s,vec2 uv) { |
26 | in vec4 vi1 ; | 26 | return texture(s,uv); |
27 | smooth out vec4 vo1 ; | 27 | } |
28 | in vec4 vi1; | ||
29 | smooth out vec4 vo1; | ||
28 | void main() { | 30 | void main() { |
29 | gl_Position = vi1; | 31 | gl_Position = vi1; |
30 | vo1 = vi1; | 32 | vo1 = vi1; |
31 | } | 33 | } |
32 | |||
33 | """ | 34 | """ |
34 | , geometryShader = Nothing | 35 | , geometryShader = Nothing |
35 | , fragmentShader = | 36 | , fragmentShader = |
36 | """ | 37 | """ |
37 | #version 330 core | 38 | #version 330 core |
38 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 39 | vec4 texture2D(sampler2D s,vec2 uv) { |
39 | smooth in vec4 vo1 ; | 40 | return texture(s,uv); |
40 | out vec4 f0 ; | 41 | } |
42 | smooth in vec4 vo1; | ||
43 | out vec4 f0; | ||
41 | void main() { | 44 | void main() { |
42 | f0 = vec4 (1.0,0.0,0.0,1.0); | 45 | f0 = vec4 (1.0,0.0,0.0,1.0); |
43 | } | 46 | } |
44 | |||
45 | """ | 47 | """ |
46 | } | 48 | } |
47 | , Program | 49 | , Program |
@@ -54,26 +56,28 @@ Pipeline | |||
54 | , vertexShader = | 56 | , vertexShader = |
55 | """ | 57 | """ |
56 | #version 330 core | 58 | #version 330 core |
57 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 59 | vec4 texture2D(sampler2D s,vec2 uv) { |
58 | in vec4 vi1 ; | 60 | return texture(s,uv); |
59 | smooth out vec4 vo1 ; | 61 | } |
62 | in vec4 vi1; | ||
63 | smooth out vec4 vo1; | ||
60 | void main() { | 64 | void main() { |
61 | gl_Position = vi1; | 65 | gl_Position = vi1; |
62 | vo1 = vi1; | 66 | vo1 = vi1; |
63 | } | 67 | } |
64 | |||
65 | """ | 68 | """ |
66 | , geometryShader = Nothing | 69 | , geometryShader = Nothing |
67 | , fragmentShader = | 70 | , fragmentShader = |
68 | """ | 71 | """ |
69 | #version 330 core | 72 | #version 330 core |
70 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 73 | vec4 texture2D(sampler2D s,vec2 uv) { |
71 | smooth in vec4 vo1 ; | 74 | return texture(s,uv); |
72 | out vec4 f0 ; | 75 | } |
76 | smooth in vec4 vo1; | ||
77 | out vec4 f0; | ||
73 | void main() { | 78 | void main() { |
74 | f0 = vec4 (0.0,1.0,0.0,1.0); | 79 | f0 = vec4 (0.0,1.0,0.0,1.0); |
75 | } | 80 | } |
76 | |||
77 | """ | 81 | """ |
78 | } | 82 | } |
79 | ] | 83 | ] |
diff --git a/testdata/simple02.out b/testdata/simple02.out index 683bd02e..faf41dea 100644 --- a/testdata/simple02.out +++ b/testdata/simple02.out | |||
@@ -24,27 +24,29 @@ Pipeline | |||
24 | , vertexShader = | 24 | , vertexShader = |
25 | """ | 25 | """ |
26 | #version 330 core | 26 | #version 330 core |
27 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 27 | vec4 texture2D(sampler2D s,vec2 uv) { |
28 | uniform mat4 MVP ; | 28 | return texture(s,uv); |
29 | in vec4 vi1 ; | 29 | } |
30 | smooth out vec4 vo1 ; | 30 | uniform mat4 MVP; |
31 | in vec4 vi1; | ||
32 | smooth out vec4 vo1; | ||
31 | void main() { | 33 | void main() { |
32 | gl_Position = (MVP) * (vi1); | 34 | gl_Position = (MVP) * (vi1); |
33 | vo1 = vi1; | 35 | vo1 = vi1; |
34 | } | 36 | } |
35 | |||
36 | """ | 37 | """ |
37 | , geometryShader = Nothing | 38 | , geometryShader = Nothing |
38 | , fragmentShader = | 39 | , fragmentShader = |
39 | """ | 40 | """ |
40 | #version 330 core | 41 | #version 330 core |
41 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 42 | vec4 texture2D(sampler2D s,vec2 uv) { |
42 | smooth in vec4 vo1 ; | 43 | return texture(s,uv); |
43 | out vec4 f0 ; | 44 | } |
45 | smooth in vec4 vo1; | ||
46 | out vec4 f0; | ||
44 | void main() { | 47 | void main() { |
45 | f0 = (vo1) * (vec4 (1.0,0.4,0.0,0.2)); | 48 | f0 = (vo1) * (vec4 (1.0,0.4,0.0,0.2)); |
46 | } | 49 | } |
47 | |||
48 | """ | 50 | """ |
49 | } | 51 | } |
50 | ] | 52 | ] |
diff --git a/testdata/simple03.out b/testdata/simple03.out index e72073e3..08a43c01 100644 --- a/testdata/simple03.out +++ b/testdata/simple03.out | |||
@@ -26,28 +26,31 @@ Pipeline | |||
26 | , vertexShader = | 26 | , vertexShader = |
27 | """ | 27 | """ |
28 | #version 330 core | 28 | #version 330 core |
29 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 29 | vec4 texture2D(sampler2D s,vec2 uv) { |
30 | uniform mat4 viewProj ; | 30 | return texture(s,uv); |
31 | in vec3 vi1 ; | 31 | } |
32 | in vec3 vi2 ; | 32 | uniform mat4 viewProj; |
33 | smooth out vec4 vo1 ; | 33 | in vec3 vi1; |
34 | in vec3 vi2; | ||
35 | smooth out vec4 vo1; | ||
34 | void main() { | 36 | void main() { |
35 | gl_Position = (viewProj) * (vec4 ((vi1).x,(vi1).y,(vi1).z,1.0)); | 37 | gl_Position = (viewProj) * (vec4 |
36 | vo1 = vec4 ((vi2).x,(vi2).y,(vi2).z,1.0); | 38 | ((vi1).x,(vi1).y,(vi1).z,1.0)); |
39 | vo1 = vec4 ((vi2).x,(vi2).y,(vi2).z,1.0); | ||
37 | } | 40 | } |
38 | |||
39 | """ | 41 | """ |
40 | , geometryShader = Nothing | 42 | , geometryShader = Nothing |
41 | , fragmentShader = | 43 | , fragmentShader = |
42 | """ | 44 | """ |
43 | #version 330 core | 45 | #version 330 core |
44 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 46 | vec4 texture2D(sampler2D s,vec2 uv) { |
45 | smooth in vec4 vo1 ; | 47 | return texture(s,uv); |
46 | out vec4 f0 ; | 48 | } |
49 | smooth in vec4 vo1; | ||
50 | out vec4 f0; | ||
47 | void main() { | 51 | void main() { |
48 | f0 = vec4 (1.0,1.0,1.0,1.0); | 52 | f0 = vec4 (1.0,1.0,1.0,1.0); |
49 | } | 53 | } |
50 | |||
51 | """ | 54 | """ |
52 | } | 55 | } |
53 | , Program | 56 | , Program |
@@ -62,28 +65,31 @@ Pipeline | |||
62 | , vertexShader = | 65 | , vertexShader = |
63 | """ | 66 | """ |
64 | #version 330 core | 67 | #version 330 core |
65 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 68 | vec4 texture2D(sampler2D s,vec2 uv) { |
66 | uniform mat4 viewProj ; | 69 | return texture(s,uv); |
67 | in vec3 vi1 ; | 70 | } |
68 | in vec3 vi2 ; | 71 | uniform mat4 viewProj; |
69 | smooth out vec4 vo1 ; | 72 | in vec3 vi1; |
73 | in vec3 vi2; | ||
74 | smooth out vec4 vo1; | ||
70 | void main() { | 75 | void main() { |
71 | gl_Position = (viewProj) * (vec4 ((vi1).x,(vi1).y,(vi1).z,1.0)); | 76 | gl_Position = (viewProj) * (vec4 |
72 | vo1 = vec4 ((vi2).x,(vi2).y,(vi2).z,1.0); | 77 | ((vi1).x,(vi1).y,(vi1).z,1.0)); |
78 | vo1 = vec4 ((vi2).x,(vi2).y,(vi2).z,1.0); | ||
73 | } | 79 | } |
74 | |||
75 | """ | 80 | """ |
76 | , geometryShader = Nothing | 81 | , geometryShader = Nothing |
77 | , fragmentShader = | 82 | , fragmentShader = |
78 | """ | 83 | """ |
79 | #version 330 core | 84 | #version 330 core |
80 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 85 | vec4 texture2D(sampler2D s,vec2 uv) { |
81 | smooth in vec4 vo1 ; | 86 | return texture(s,uv); |
82 | out vec4 f0 ; | 87 | } |
88 | smooth in vec4 vo1; | ||
89 | out vec4 f0; | ||
83 | void main() { | 90 | void main() { |
84 | f0 = vo1; | 91 | f0 = vo1; |
85 | } | 92 | } |
86 | |||
87 | """ | 93 | """ |
88 | } | 94 | } |
89 | ] | 95 | ] |
diff --git a/testdata/texture01.out b/testdata/texture01.out index ec89a6c0..eea2d8ff 100644 --- a/testdata/texture01.out +++ b/testdata/texture01.out | |||
@@ -27,29 +27,31 @@ Pipeline | |||
27 | , vertexShader = | 27 | , vertexShader = |
28 | """ | 28 | """ |
29 | #version 330 core | 29 | #version 330 core |
30 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 30 | vec4 texture2D(sampler2D s,vec2 uv) { |
31 | uniform mat4 MVP ; | 31 | return texture(s,uv); |
32 | in vec4 vi1 ; | 32 | } |
33 | in vec2 vi2 ; | 33 | uniform mat4 MVP; |
34 | smooth out vec2 vo1 ; | 34 | in vec4 vi1; |
35 | in vec2 vi2; | ||
36 | smooth out vec2 vo1; | ||
35 | void main() { | 37 | void main() { |
36 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); | 38 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); |
37 | vo1 = vi2; | 39 | vo1 = vi2; |
38 | } | 40 | } |
39 | |||
40 | """ | 41 | """ |
41 | , geometryShader = Nothing | 42 | , geometryShader = Nothing |
42 | , fragmentShader = | 43 | , fragmentShader = |
43 | """ | 44 | """ |
44 | #version 330 core | 45 | #version 330 core |
45 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 46 | vec4 texture2D(sampler2D s,vec2 uv) { |
46 | uniform sampler2D diffuse ; | 47 | return texture(s,uv); |
47 | smooth in vec2 vo1 ; | 48 | } |
48 | out vec4 f0 ; | 49 | uniform sampler2D diffuse; |
50 | smooth in vec2 vo1; | ||
51 | out vec4 f0; | ||
49 | void main() { | 52 | void main() { |
50 | f0 = texture2D (diffuse,vo1); | 53 | f0 = texture2D (diffuse,vo1); |
51 | } | 54 | } |
52 | |||
53 | """ | 55 | """ |
54 | } | 56 | } |
55 | ] | 57 | ] |
diff --git a/testdata/texture02.out b/testdata/texture02.out index d57e830f..0f94c705 100644 --- a/testdata/texture02.out +++ b/testdata/texture02.out | |||
@@ -79,29 +79,31 @@ Pipeline | |||
79 | , vertexShader = | 79 | , vertexShader = |
80 | """ | 80 | """ |
81 | #version 330 core | 81 | #version 330 core |
82 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 82 | vec4 texture2D(sampler2D s,vec2 uv) { |
83 | uniform mat4 MVP ; | 83 | return texture(s,uv); |
84 | in vec4 vi1 ; | 84 | } |
85 | in vec2 vi2 ; | 85 | uniform mat4 MVP; |
86 | smooth out vec2 vo1 ; | 86 | in vec4 vi1; |
87 | in vec2 vi2; | ||
88 | smooth out vec2 vo1; | ||
87 | void main() { | 89 | void main() { |
88 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); | 90 | gl_Position = ((MVP) * (vi1)) * (vec4 (0.5,0.5,0.5,1.0)); |
89 | vo1 = vi2; | 91 | vo1 = vi2; |
90 | } | 92 | } |
91 | |||
92 | """ | 93 | """ |
93 | , geometryShader = Nothing | 94 | , geometryShader = Nothing |
94 | , fragmentShader = | 95 | , fragmentShader = |
95 | """ | 96 | """ |
96 | #version 330 core | 97 | #version 330 core |
97 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 98 | vec4 texture2D(sampler2D s,vec2 uv) { |
98 | uniform sampler2D s0 ; | 99 | return texture(s,uv); |
99 | smooth in vec2 vo1 ; | 100 | } |
100 | out vec4 f0 ; | 101 | uniform sampler2D s0; |
102 | smooth in vec2 vo1; | ||
103 | out vec4 f0; | ||
101 | void main() { | 104 | void main() { |
102 | f0 = texture2D (s0,vo1); | 105 | f0 = texture2D (s0,vo1); |
103 | } | 106 | } |
104 | |||
105 | """ | 107 | """ |
106 | } | 108 | } |
107 | ] | 109 | ] |
diff --git a/testdata/uniformparam01.out b/testdata/uniformparam01.out index be9f3748..1b5bf8ef 100644 --- a/testdata/uniformparam01.out +++ b/testdata/uniformparam01.out | |||
@@ -22,27 +22,29 @@ Pipeline | |||
22 | , vertexShader = | 22 | , vertexShader = |
23 | """ | 23 | """ |
24 | #version 330 core | 24 | #version 330 core |
25 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 25 | vec4 texture2D(sampler2D s,vec2 uv) { |
26 | uniform mat4 MVP ; | 26 | return texture(s,uv); |
27 | in vec4 vi1 ; | 27 | } |
28 | flat out vec4 vo1 ; | 28 | uniform mat4 MVP; |
29 | in vec4 vi1; | ||
30 | flat out vec4 vo1; | ||
29 | void main() { | 31 | void main() { |
30 | gl_Position = (MVP) * (vi1); | 32 | gl_Position = (MVP) * (vi1); |
31 | vo1 = vi1; | 33 | vo1 = vi1; |
32 | } | 34 | } |
33 | |||
34 | """ | 35 | """ |
35 | , geometryShader = Nothing | 36 | , geometryShader = Nothing |
36 | , fragmentShader = | 37 | , fragmentShader = |
37 | """ | 38 | """ |
38 | #version 330 core | 39 | #version 330 core |
39 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 40 | vec4 texture2D(sampler2D s,vec2 uv) { |
40 | flat in vec4 vo1 ; | 41 | return texture(s,uv); |
41 | out vec4 f0 ; | 42 | } |
43 | flat in vec4 vo1; | ||
44 | out vec4 f0; | ||
42 | void main() { | 45 | void main() { |
43 | f0 = vo1; | 46 | f0 = vo1; |
44 | } | 47 | } |
45 | |||
46 | """ | 48 | """ |
47 | } | 49 | } |
48 | ] | 50 | ] |
diff --git a/testdata/uniformparam02.out b/testdata/uniformparam02.out index d057c8c0..8fde7aec 100644 --- a/testdata/uniformparam02.out +++ b/testdata/uniformparam02.out | |||
@@ -22,24 +22,27 @@ Pipeline | |||
22 | , vertexShader = | 22 | , vertexShader = |
23 | """ | 23 | """ |
24 | #version 330 core | 24 | #version 330 core |
25 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 25 | vec4 texture2D(sampler2D s,vec2 uv) { |
26 | in vec4 vi1 ; | 26 | return texture(s,uv); |
27 | flat out vec4 vo1 ; | 27 | } |
28 | in vec4 vi1; | ||
29 | flat out vec4 vo1; | ||
28 | void main() { | 30 | void main() { |
29 | gl_Position = vi1; | 31 | gl_Position = vi1; |
30 | vo1 = vi1; | 32 | vo1 = vi1; |
31 | } | 33 | } |
32 | |||
33 | """ | 34 | """ |
34 | , geometryShader = Nothing | 35 | , geometryShader = Nothing |
35 | , fragmentShader = | 36 | , fragmentShader = |
36 | """ | 37 | """ |
37 | #version 330 core | 38 | #version 330 core |
38 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 39 | vec4 texture2D(sampler2D s,vec2 uv) { |
39 | flat in vec4 vo1 ; | 40 | return texture(s,uv); |
41 | } | ||
42 | flat in vec4 vo1; | ||
40 | void main() { | 43 | void main() { |
44 | |||
41 | } | 45 | } |
42 | |||
43 | """ | 46 | """ |
44 | } | 47 | } |
45 | ] | 48 | ] |
diff --git a/testdata/uniformparam03.out b/testdata/uniformparam03.out index be9f3748..1b5bf8ef 100644 --- a/testdata/uniformparam03.out +++ b/testdata/uniformparam03.out | |||
@@ -22,27 +22,29 @@ Pipeline | |||
22 | , vertexShader = | 22 | , vertexShader = |
23 | """ | 23 | """ |
24 | #version 330 core | 24 | #version 330 core |
25 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 25 | vec4 texture2D(sampler2D s,vec2 uv) { |
26 | uniform mat4 MVP ; | 26 | return texture(s,uv); |
27 | in vec4 vi1 ; | 27 | } |
28 | flat out vec4 vo1 ; | 28 | uniform mat4 MVP; |
29 | in vec4 vi1; | ||
30 | flat out vec4 vo1; | ||
29 | void main() { | 31 | void main() { |
30 | gl_Position = (MVP) * (vi1); | 32 | gl_Position = (MVP) * (vi1); |
31 | vo1 = vi1; | 33 | vo1 = vi1; |
32 | } | 34 | } |
33 | |||
34 | """ | 35 | """ |
35 | , geometryShader = Nothing | 36 | , geometryShader = Nothing |
36 | , fragmentShader = | 37 | , fragmentShader = |
37 | """ | 38 | """ |
38 | #version 330 core | 39 | #version 330 core |
39 | vec4 texture2D(sampler2D s, vec2 uv){return texture(s,uv);} | 40 | vec4 texture2D(sampler2D s,vec2 uv) { |
40 | flat in vec4 vo1 ; | 41 | return texture(s,uv); |
41 | out vec4 f0 ; | 42 | } |
43 | flat in vec4 vo1; | ||
44 | out vec4 f0; | ||
42 | void main() { | 45 | void main() { |
43 | f0 = vo1; | 46 | f0 = vo1; |
44 | } | 47 | } |
45 | |||
46 | """ | 48 | """ |
47 | } | 49 | } |
48 | ] | 50 | ] |