diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2012-11-02 14:25:59 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2012-11-02 14:25:59 +0000 |
commit | 2c0b722536a4ec2f723c289b695b983741c678f8 (patch) | |
tree | 650e06f5837b7995a60bf51b47f5ec9de4ee9ebe /packages/noncvs/windows/extra/Gem/examples/10.glsl/geo.geom | |
parent | 69101e6e7eb00acaee619d4aa815d4a85925cc60 (diff) |
commit windows binaries from old rsync auto-build setup, including Gem 0.93.1
svn path=/trunk/; revision=16520
Diffstat (limited to 'packages/noncvs/windows/extra/Gem/examples/10.glsl/geo.geom')
-rw-r--r-- | packages/noncvs/windows/extra/Gem/examples/10.glsl/geo.geom | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/packages/noncvs/windows/extra/Gem/examples/10.glsl/geo.geom b/packages/noncvs/windows/extra/Gem/examples/10.glsl/geo.geom new file mode 100644 index 00000000..3271c6fc --- /dev/null +++ b/packages/noncvs/windows/extra/Gem/examples/10.glsl/geo.geom @@ -0,0 +1,28 @@ +#version 120 +#extension GL_EXT_geometry_shader4: enable + +void main(void) +{ + //increment variable + int i,j; + float rnd1,rnd2; + rnd1 = 0.0216767863321334264; // seed + rnd2 = 0.0475785688678678345; + for(j=0; j< 40; j++) + { + rnd1 = fract(124.321345312123465*rnd1) -0.5; // easy way to generated pseudo random number + rnd2 = fract(5234.43532345435245*rnd2) -0.5; + + //draw 40 time the same geometry, but with small shift in it's position + for(i=0; i< gl_VerticesIn; i++) + { + gl_FrontColor = gl_FrontColorIn[i]; + gl_TexCoord[0] = gl_TexCoordIn[i][0]; + gl_Position = gl_PositionIn[i]; // get position of the original point + gl_Position.xy += vec2(rnd1,rnd2)/3.; // add small random + // the geometry as already been transform in 2d, so we jut have to move it in X and Y + EmitVertex(); + } + EndPrimitive(); + } +} |