~ubuntu-branches/debian/sid/gource/sid

« back to all changes in this revision

Viewing changes to data/shaders/bloom.frag

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Caudwell
  • Date: 2011-05-16 11:30:00 UTC
  • mfrom: (1.2.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20110516113000-vcqcni97y90b5eyy
Tags: 0.34-1
* New upstream release
* Changed build dependency from FTGL to Freetype 2
* Updated debian/copyright
* Bump Standards-Version to 3.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
varying vec3 pos;
 
3
 
 
4
void main()
 
5
{
 
6
    float r = fract(sin(dot(pos.xy ,vec2(11.3713,67.3219))) * 2351.3718);
 
7
 
 
8
    float offset = (0.5 - r) * gl_TexCoord[0].x * 0.045;
 
9
 
 
10
    float intensity = min(1.0, cos((length(pos*2.0)+offset)/gl_TexCoord[0].x));
 
11
    float gradient  = intensity * smoothstep(0.0, 2.0, intensity);
 
12
 
 
13
    gradient *= smoothstep(1.0,0.67+r*0.33, 1.0-intensity);
 
14
 
 
15
    gl_FragColor = gl_Color * gradient;
 
16
}