~ubuntu-branches/ubuntu/raring/glmark2/raring

« back to all changes in this revision

Viewing changes to data/shaders/ideas-paper.vert

  • Committer: Package Import Robot
  • Author(s): Ricardo Salveti de Araujo
  • Date: 2012-08-21 15:38:09 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20120821153809-bwux72bat8qp2n5v
Tags: 2012.08-0ubuntu1
* New upstream release 2012.08 (LP: #1039736)
  - Avoid crashing if gl used is not >= 2.0 (LP: #842279)
* Bumping dh compatibility level to v9
* debian/control:
  - Update Standards-Version to 3.9.3.
  - Add libjpeg-dev build dependency.
  - Use libegl1-x11-dev as an build-dep alternative instead of libegl1-dev.
  - Update description of glmark2-data binary package.
* debian/copyright:
  - Refresh copyright based on the current upstrem version
* debian/rules:
  - Clean compiled python code from unpacked waflib/ directory, as
    described in http://wiki.debian.org/UnpackWaf

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
uniform mat4 projection;
 
2
uniform mat4 modelview;
 
3
uniform vec3 lightPosition;
 
4
uniform vec3 logoDirection;
 
5
uniform float currentTime;
 
6
attribute vec3 vertex;
 
7
varying vec4 color;
 
8
 
 
9
void main()
 
10
{
 
11
    vec4 curVertex = vec4(vertex.x, vertex.y, vertex.z, 1.0);
 
12
    gl_Position = projection * modelview * curVertex;
 
13
    float referenceTime = 15.0;
 
14
    vec3 lightDirection = normalize(lightPosition - vertex);    
 
15
    float c = max(dot(lightDirection, logoDirection), 0.0);
 
16
    c = c * c * c * lightDirection.y;
 
17
    if ((currentTime > referenceTime - 5.0) && (currentTime < referenceTime - 3.0))
 
18
    {
 
19
        c *= 1.0 - (currentTime - (referenceTime - 5.0)) * 0.5;
 
20
    }
 
21
    color = vec4(c, c, (c * 0.78125), 1.0);
 
22
}