~ubuntu-branches/ubuntu/raring/openwalnut/raring

« back to all changes in this revision

Viewing changes to src/modules/coordinateHUD/shaders/WMCoordinateHUD-fragment.glsl

  • Committer: Package Import Robot
  • Author(s): Sebastian Eichelbaum
  • Date: 2012-12-12 11:26:32 UTC
  • mfrom: (3.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20121212112632-xhiuwkxuz5h0idkh
Tags: 1.3.1+hg5849-1
* Minor changes compared to 1.3.0 but included several bug fixes.
* See http://www.openwalnut.org/versions/4

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
#version 120
26
26
 
 
27
/**
 
28
 * Texture sampler for the face-label texture
 
29
 */
 
30
#ifdef USE_FACETEXTURE
 
31
    uniform sampler2D tex;
 
32
#endif
 
33
 
27
34
void main()
28
35
{
 
36
#ifdef USE_FACETEXTURE
 
37
    vec4 f = texture2D( tex, gl_TexCoord[0].st );
 
38
 
 
39
    // simply set the color. All the magic happens in vertex shader.
 
40
    gl_FragColor = vec4( f.r * gl_Color.rgb, 1.0 );
 
41
#else
29
42
    // simply set the color. All the magic happens in vertex shader.
30
43
    gl_FragColor = gl_Color;
31
 
 
 
44
#endif
32
45
    // this line ensures that the coordinate system is always on top.
33
46
    gl_FragDepth = 0.001 * gl_FragCoord.z;
34
47
}