home *** CD-ROM | disk | FTP | other *** search
- //------------------------------ tpVertexShader.glsl ------------------------------
-
- // --------------------------------------------------------
- // ⌐ 2004-2005 Graphic Remedy. All Rights Reserved.
- // --------------------------------------------------------
-
- // Will get the surface normal:
- varying vec3 surfaceNormal;
-
- // Will get the vertex position:
- varying vec3 vertexPosition;
-
-
- // ---------------------------------------------------------------------------
- // Name: Teapot application vertex shader main function
- // ---------------------------------------------------------------------------
- void main(void)
- {
- // Calculate the vertex position in eye coordinates:
- vertexPosition = vec3(gl_ModelViewMatrix * gl_Vertex);
-
- // Calculate the surface normal in eye coordinates:
- surfaceNormal = normalize(gl_NormalMatrix * gl_Normal);
-
- // Output texture unit 0 coordinates:
- gl_TexCoord[0] = gl_MultiTexCoord0;
-
- // Output the transformed vertex position:
- gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
- }