~ubuntu-branches/ubuntu/saucy/blender/saucy-proposed

« back to all changes in this revision

Viewing changes to source/blender/gpu/shaders/gpu_shader_vertex.glsl

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
varying vec3 varposition;
 
3
varying vec3 varnormal;
 
4
 
 
5
void main()
 
6
{
 
7
        vec4 co = gl_ModelViewMatrix * gl_Vertex;
 
8
 
 
9
        varposition = co.xyz;
 
10
        varnormal = normalize(gl_NormalMatrix * gl_Normal);
 
11
        gl_Position = gl_ProjectionMatrix * co;
 
12
 
 
13
        // Setting gl_ClipVertex is necessary to get glClipPlane working on NVIDIA graphic cards.
 
14
        // gl_ClipVertex works only on NVIDIA graphic cards so we have to check with 
 
15
        // __GLSL_CG_DATA_TYPES if a NVIDIA graphic card is used (Cg support).
 
16
        // gl_ClipVerte is supported up to GLSL 1.20.
 
17
        #ifdef __GLSL_CG_DATA_TYPES 
 
18
                gl_ClipVertex = gl_ModelViewMatrix * gl_Vertex; 
 
19
        #endif 
 
20