2009-08-08 10:17:58 +00:00
|
|
|
varying vec4 rawpos;
|
|
|
|
varying vec4 ecPosition;
|
|
|
|
varying vec3 VNormal;
|
2010-03-28 17:00:19 +00:00
|
|
|
varying vec3 VTangent;
|
|
|
|
varying vec3 VBinormal;
|
2009-08-08 10:17:58 +00:00
|
|
|
varying vec3 Normal;
|
2010-03-28 17:00:19 +00:00
|
|
|
varying vec4 constantColor;
|
2010-04-02 07:06:39 +00:00
|
|
|
varying float bump;
|
2010-03-28 17:00:19 +00:00
|
|
|
|
|
|
|
attribute vec3 tangent;
|
|
|
|
attribute vec3 binormal;
|
2009-08-08 10:17:58 +00:00
|
|
|
|
|
|
|
void main(void)
|
|
|
|
{
|
2010-03-28 17:00:19 +00:00
|
|
|
rawpos = gl_Vertex;
|
|
|
|
ecPosition = gl_ModelViewMatrix * rawpos;
|
|
|
|
Normal = normalize(gl_Normal);
|
|
|
|
VNormal = gl_NormalMatrix * gl_Normal;
|
|
|
|
VTangent = gl_NormalMatrix * tangent;
|
|
|
|
VBinormal = gl_NormalMatrix * binormal;
|
2010-04-02 07:06:39 +00:00
|
|
|
bump = 1.0;
|
2009-08-08 10:17:58 +00:00
|
|
|
|
2010-03-28 17:00:19 +00:00
|
|
|
gl_FrontColor = gl_Color;
|
|
|
|
constantColor = gl_FrontMaterial.emission
|
|
|
|
+ gl_FrontColor * (gl_LightModel.ambient + gl_LightSource[0].ambient);
|
|
|
|
gl_Position = ftransform();
|
|
|
|
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
2009-08-08 10:17:58 +00:00
|
|
|
}
|