summaryrefslogtreecommitdiffstats
path: root/shader/light.vert
blob: 2faa1c077396c50672cd943b62cb1ba550fb3938 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
varying vec4 diffuse, ambient;
varying vec3 normal, pos;


void main() {
  normal = gl_NormalMatrix * gl_Normal;
  
  pos = vec3(gl_ModelViewMatrix * gl_Vertex);
  
  diffuse = gl_FrontMaterial.diffuse * gl_LightSource[0].diffuse;
  
  ambient = gl_FrontMaterial.ambient * gl_LightSource[0].ambient;
  
  gl_TexCoord[0] = gl_MultiTexCoord0;
  gl_Position = ftransform();
}