2009-08-08 10:17:58 +00:00
|
|
|
varying vec4 rawpos;
|
|
|
|
varying vec4 ecPosition;
|
|
|
|
varying vec3 VNormal;
|
|
|
|
varying vec3 Normal;
|
2010-02-12 14:43:26 +00:00
|
|
|
varying vec4 constantColor;
|
2009-08-08 10:17:58 +00:00
|
|
|
|
|
|
|
void main(void)
|
|
|
|
{
|
|
|
|
rawpos = gl_Vertex;
|
|
|
|
ecPosition = gl_ModelViewMatrix * gl_Vertex;
|
|
|
|
VNormal = normalize(gl_NormalMatrix * gl_Normal);
|
|
|
|
Normal = normalize(gl_Normal);
|
|
|
|
|
2010-02-12 14:43:26 +00:00
|
|
|
gl_FrontColor = gl_Color;
|
|
|
|
constantColor = gl_FrontMaterial.emission
|
2010-02-12 11:38:53 +00:00
|
|
|
+ gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient);
|
2009-08-08 10:17:58 +00:00
|
|
|
gl_Position = ftransform();
|
|
|
|
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
|
|
|
}
|