diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2012-11-02 15:36:19 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2012-11-02 15:36:19 +0000 |
commit | c823b2bf3165990a556d50990adf4da5cee95593 (patch) | |
tree | 733f3d3a6ed7a5e8f80d4b4553299902d89b58b8 /packages/noncvs/windows/extra/Gem/examples/12.multi_screen_projection/nfp_33.vert | |
parent | 2c0b722536a4ec2f723c289b695b983741c678f8 (diff) |
commit Gem 0.93.3 from http://gem.iem.at/releases/0.93.3/Gem-0.93.3-W32-i686.zip
svn path=/trunk/; revision=16521
Diffstat (limited to 'packages/noncvs/windows/extra/Gem/examples/12.multi_screen_projection/nfp_33.vert')
-rw-r--r-- | packages/noncvs/windows/extra/Gem/examples/12.multi_screen_projection/nfp_33.vert | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/packages/noncvs/windows/extra/Gem/examples/12.multi_screen_projection/nfp_33.vert b/packages/noncvs/windows/extra/Gem/examples/12.multi_screen_projection/nfp_33.vert index 68066b04..cac28b16 100644 --- a/packages/noncvs/windows/extra/Gem/examples/12.multi_screen_projection/nfp_33.vert +++ b/packages/noncvs/windows/extra/Gem/examples/12.multi_screen_projection/nfp_33.vert @@ -1,37 +1,37 @@ -uniform vec2 Vtl,Vbl,Vtr,Vbr,Vtc,Vbc,Vcl,Vcr,Vcc; // Vertex position -uniform vec2 Ttl,Tbl,Ttr,Tbr; // texture coordinate -uniform vec2 center; - -varying vec2 pos; - -void main() -{ - gl_TexCoord[0] = gl_MultiTexCoord0; - - vec4 position = gl_Vertex; - position.xy += 1.; - position.xy /= 2.; - pos = position.xy; - - vec2 tex_top = mix(Ttl,Ttr,pos.x); - vec2 tex_bottom = mix(Tbl,Tbr,pos.x); - gl_TexCoord[0].st = mix(tex_top,tex_bottom, pos.y); - - vec2 pos_top1 = mix(Vtl,Vtc,position.x); - vec2 pos_top2 = mix(Vtc,Vtr,position.x); - vec2 pos_top = mix(pos_top1,pos_top2,position.x); - - vec2 pos_center1 = mix(Vcl,Vcc,position.x); - vec2 pos_center2 = mix(Vcc,Vcr,position.x); - vec2 pos_center = mix(pos_center1,pos_center2,position.x); - - vec2 pos_bottom1 = mix(Vbl,Vbc,position.x); - vec2 pos_bottom2 = mix(Vbc,Vbr,position.x); - vec2 pos_bottom = mix(pos_bottom1,pos_bottom2,position.x); - - vec2 position1 = mix(pos_top,pos_center,position.y); - vec2 position2 = mix(pos_center,pos_bottom,position.y); - position.xy = mix(position1,position2, position.y); - - gl_Position = gl_ModelViewProjectionMatrix * position; -} +uniform vec2 Vtl,Vbl,Vtr,Vbr,Vtc,Vbc,Vcl,Vcr,Vcc; // Vertex position
+uniform vec2 Ttl,Tbl,Ttr,Tbr; // texture coordinate
+uniform vec2 center;
+
+varying vec2 pos;
+
+void main()
+{
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+
+ vec4 position = gl_Vertex;
+ position.xy += 1.;
+ position.xy /= 2.;
+ pos = position.xy;
+
+ vec2 tex_top = mix(Ttl,Ttr,pos.x);
+ vec2 tex_bottom = mix(Tbl,Tbr,pos.x);
+ gl_TexCoord[0].st = mix(tex_top,tex_bottom, pos.y);
+
+ vec2 pos_top1 = mix(Vtl,Vtc,position.x);
+ vec2 pos_top2 = mix(Vtc,Vtr,position.x);
+ vec2 pos_top = mix(pos_top1,pos_top2,position.x);
+
+ vec2 pos_center1 = mix(Vcl,Vcc,position.x);
+ vec2 pos_center2 = mix(Vcc,Vcr,position.x);
+ vec2 pos_center = mix(pos_center1,pos_center2,position.x);
+
+ vec2 pos_bottom1 = mix(Vbl,Vbc,position.x);
+ vec2 pos_bottom2 = mix(Vbc,Vbr,position.x);
+ vec2 pos_bottom = mix(pos_bottom1,pos_bottom2,position.x);
+
+ vec2 position1 = mix(pos_top,pos_center,position.y);
+ vec2 position2 = mix(pos_center,pos_bottom,position.y);
+ position.xy = mix(position1,position2, position.y);
+
+ gl_Position = gl_ModelViewProjectionMatrix * position;
+}
|