summaryrefslogtreecommitdiffstats
path: root/src/GLSLShaderTest/toon.vert
blob: d044af71c5b809f0e3db0f8b8320b4a2337a921a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//
// Vertex shader for cartoon-style shading
//
// Author: Philip Rideout
//
// Copyright (c) 2004 3Dlabs Inc. Ltd.
//
// See 3Dlabs-License.txt for license information
//

varying vec3 Normal;
varying vec3 LightDir;

void main(void)
{
	Normal = normalize(gl_NormalMatrix * gl_Normal);
	gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
	LightDir  = vec3(normalize(gl_LightSource[0].position));
}