summaryrefslogtreecommitdiff
path: root/testdata/example08.out
diff options
context:
space:
mode:
authorPéter Diviánszky <divipp@gmail.com>2016-02-17 09:05:17 +0100
committerPéter Diviánszky <divipp@gmail.com>2016-02-17 09:49:31 +0100
commit02d18fe787cbe69d422ad9f76a5324f6ba86f4da (patch)
tree1e8446210e16703fd79d2497f674491c3ff74a2c /testdata/example08.out
parentc1f5d16a3d7b8f394094088d0bb92876bb3e39db (diff)
reuse identical shader programs
Diffstat (limited to 'testdata/example08.out')
-rw-r--r--testdata/example08.out70
1 files changed, 3 insertions, 67 deletions
diff --git a/testdata/example08.out b/testdata/example08.out
index 45486ff0..1921b311 100644
--- a/testdata/example08.out
+++ b/testdata/example08.out
@@ -504,70 +504,6 @@ Pipeline
504 } 504 }
505 void main() { 505 void main() {
506 gl_Position = trMat 506 gl_Position = trMat
507 (rotMatrixZ ((time) * (0.0))
508 ,(MVP) * (trX
509 ((0.0) + ((sin (time)) * (0.1))
510 ,scale
511 (4.0e-2,trMat (rotMatrixX (((time) * (2.0)) * (0.0)),vi1)))));
512 vo1 = vi1;
513 }
514 """
515 , geometryShader = Nothing
516 , fragmentShader =
517 """
518 #version 330 core
519 vec4 texture2D(sampler2D s,vec2 uv) {
520 return texture(s,uv);
521 }
522 smooth in vec4 vo1;
523 out vec4 f0;
524 void main() {
525 f0 = vo1;
526 }
527 """
528 }
529 , Program
530 { programUniforms =
531 fromList [ ( "MVP" , M44F ) , ( "Time" , Float ) ]
532 , programStreams =
533 fromList
534 [ ( "vi1" , Parameter { name = "position4" , ty = V4F } ) ]
535 , programInTextures = fromList []
536 , programOutput = [ Parameter { name = "f0" , ty = V4F } ]
537 , vertexShader =
538 """
539 #version 330 core
540 vec4 texture2D(sampler2D s,vec2 uv) {
541 return texture(s,uv);
542 }
543 uniform mat4 MVP;
544 uniform float Time;
545 in vec4 vi1;
546 smooth out vec4 vo1;
547 mat4 rotMatrixX(float z0) {
548 return mat4 (vec4 (1.0,0.0,0.0,0.0)
549 ,vec4 (0.0,cos (z0),sin (z0),0.0)
550 ,vec4 (0.0,(0.0) - (sin (z0)),cos (z0),0.0)
551 ,vec4 (0.0,0.0,0.0,1.0));
552 }
553 mat4 rotMatrixZ(float z0) {
554 return mat4 (vec4 (cos (z0),sin (z0),0.0,0.0)
555 ,vec4 ((0.0) - (sin (z0)),cos (z0),0.0,0.0)
556 ,vec4 (0.0,0.0,1.0,0.0)
557 ,vec4 (0.0,0.0,0.0,1.0));
558 }
559 vec4 scale(float z0,vec4 z1) {
560 return (z1) * (vec4 (z0,z0,z0,1.0));
561 }
562 float time = Time;
563 vec4 trMat(mat4 z0,vec4 z1) {
564 return (z0) * (z1);
565 }
566 vec4 trX(float z0,vec4 z1) {
567 return (vec4 (z0,0.0,0.0,0.0)) + (z1);
568 }
569 void main() {
570 gl_Position = trMat
571 (rotMatrixZ ((time) * (-0.5)) 507 (rotMatrixZ ((time) * (-0.5))
572 ,(MVP) * (trX 508 ,(MVP) * (trX
573 ((-0.25) + ((sin (time)) * (0.1)) 509 ((-0.25) + ((sin (time)) * (0.1))
@@ -597,7 +533,7 @@ Pipeline
597 , slotStreams = fromList [ ( "position4" , V4F ) ] 533 , slotStreams = fromList [ ( "position4" , V4F ) ]
598 , slotUniforms = fromList [ ( "MVP" , M44F ) , ( "Time" , Float ) ] 534 , slotUniforms = fromList [ ( "MVP" , M44F ) , ( "Time" , Float ) ]
599 , slotPrimitive = Triangles 535 , slotPrimitive = Triangles
600 , slotPrograms = [ 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ] 536 , slotPrograms = [ 0 , 1 , 2 , 3 , 4 , 5 , 6 , 2 , 7 ]
601 } 537 }
602 ] 538 ]
603 , streams = [] 539 , streams = []
@@ -608,7 +544,7 @@ Pipeline
608 , ClearImage 544 , ClearImage
609 { imageSemantic = Color , clearValue = VV4F (V4 0.0 0.0 0.5 1.0) } 545 { imageSemantic = Color , clearValue = VV4F (V4 0.0 0.0 0.5 1.0) }
610 ] 546 ]
611 , SetProgram 8 547 , SetProgram 7
612 , SetRasterContext 548 , SetRasterContext
613 (TriangleCtx CullNone PolygonFill NoOffset LastVertex) 549 (TriangleCtx CullNone PolygonFill NoOffset LastVertex)
614 , SetAccumulationContext 550 , SetAccumulationContext
@@ -620,7 +556,7 @@ Pipeline
620 ] 556 ]
621 } 557 }
622 , RenderSlot 0 558 , RenderSlot 0
623 , SetProgram 7 559 , SetProgram 2
624 , SetRasterContext 560 , SetRasterContext
625 (TriangleCtx CullNone PolygonFill NoOffset LastVertex) 561 (TriangleCtx CullNone PolygonFill NoOffset LastVertex)
626 , SetAccumulationContext 562 , SetAccumulationContext