2009-08-08 10:17:58 +00:00
|
|
|
#version 120
|
|
|
|
|
2010-08-21 14:51:13 +00:00
|
|
|
varying vec4 rawpos;
|
|
|
|
varying vec4 ecPosition;
|
|
|
|
varying vec3 VNormal;
|
|
|
|
varying vec3 Normal;
|
2010-09-03 07:37:52 +00:00
|
|
|
varying vec4 constantColor;
|
2009-08-08 10:17:58 +00:00
|
|
|
|
|
|
|
void main(void)
|
|
|
|
{
|
|
|
|
gl_TexCoord[0] = gl_MultiTexCoord0;
|
|
|
|
|
2010-08-21 14:51:13 +00:00
|
|
|
rawpos = gl_Vertex;
|
2009-08-08 10:17:58 +00:00
|
|
|
ecPosition = gl_ModelViewMatrix * gl_Vertex;
|
|
|
|
VNormal = normalize(gl_NormalMatrix * gl_Normal);
|
|
|
|
Normal = normalize(gl_Normal);
|
2010-08-21 14:51:13 +00:00
|
|
|
|
2010-09-03 07:37:52 +00:00
|
|
|
gl_FrontColor = gl_Color;
|
|
|
|
|
|
|
|
constantColor = gl_FrontMaterial.emission
|
|
|
|
+ gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient);
|
|
|
|
|
2009-08-08 10:17:58 +00:00
|
|
|
gl_Position = ftransform();
|
2010-08-21 14:51:13 +00:00
|
|
|
}
|