fix the spelling in whole piglit
[piglit.git] / tests / glslparsertest / glsl2 / xreal-lighting-d-omni.vert
blob6d2b010c231ab6935fa34c870944cd993c8ca59a
1 // [config]
2 // expect_result: pass
3 // glsl_version: 1.10
4 //
5 // [end config]
7 /*
8 ===========================================================================
9 Copyright (C) 2006 Robert Beckebans <trebor_7@users.sourceforge.net>
11 This file is part of XreaL source code.
13 XreaL source code is free software; you can redistribute it
14 and/or modify it under the terms of the GNU General Public License as
15 published by the Free Software Foundation; either version 2 of the License,
16 or (at your option) any later version.
18 XreaL source code is distributed in the hope that it will be
19 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 GNU General Public License for more details.
23 You should have received a copy of the GNU General Public License
24 along with XreaL source code; if not, write to the Free Software
25 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
26 ===========================================================================
29 attribute vec4          attr_TexCoord0;
31 varying vec3            var_Vertex;
32 varying vec3        var_Normal;
33 varying vec2            var_TexDiffuse;
34 varying vec4            var_TexAtten;
36 void    main()
38         // transform vertex position into homogeneous clip-space
39         gl_Position = ftransform();
40         
41         // assign position in object space
42         var_Vertex = gl_Vertex.xyz;
43         
44         // assign normal in object space
45         var_Normal = gl_Normal.xyz;
46                 
47         // transform diffusemap texcoords
48         var_TexDiffuse = (gl_TextureMatrix[0] * attr_TexCoord0).st;
49         
50         // calc light xy,z attenuation in light space
51         var_TexAtten = gl_TextureMatrix[3] * gl_Vertex;