2010-03-22 22:00:44 +00:00
|
|
|
// -*- mode: C; -*-
|
|
|
|
// Licence: GPL v2
|
|
|
|
// Author: Frederic Bouvier
|
|
|
|
|
2010-03-12 22:25:19 +00:00
|
|
|
varying vec4 rawpos;
|
|
|
|
varying vec4 ecPosition;
|
|
|
|
varying vec3 VNormal;
|
|
|
|
varying vec3 Normal;
|
|
|
|
varying vec3 VTangent;
|
2012-08-06 11:15:43 +00:00
|
|
|
//varying vec3 VBinormal;
|
2010-03-12 22:25:19 +00:00
|
|
|
varying vec4 constantColor;
|
|
|
|
|
2012-08-06 11:15:43 +00:00
|
|
|
attribute vec3 tangent;//, binormal;
|
2010-03-22 22:00:44 +00:00
|
|
|
|
2011-11-28 15:02:20 +00:00
|
|
|
////fog "include"////////
|
2012-02-14 16:38:18 +00:00
|
|
|
// uniform int fogType;
|
|
|
|
//
|
|
|
|
// void fog_Func(int type);
|
2011-11-28 15:02:20 +00:00
|
|
|
/////////////////////////
|
|
|
|
|
2010-03-12 22:25:19 +00:00
|
|
|
void main(void)
|
|
|
|
{
|
|
|
|
rawpos = gl_Vertex;
|
|
|
|
ecPosition = gl_ModelViewMatrix * gl_Vertex;
|
|
|
|
VNormal = normalize(gl_NormalMatrix * gl_Normal);
|
|
|
|
Normal = normalize(gl_Normal);
|
2010-03-22 22:00:44 +00:00
|
|
|
VTangent = gl_NormalMatrix * tangent;
|
|
|
|
VBinormal = gl_NormalMatrix * binormal;
|
2010-03-12 22:25:19 +00:00
|
|
|
gl_FrontColor = gl_Color;
|
|
|
|
constantColor = gl_FrontMaterial.emission
|
2012-02-14 16:38:18 +00:00
|
|
|
+ gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient);
|
2010-03-12 22:25:19 +00:00
|
|
|
gl_Position = ftransform();
|
|
|
|
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
2012-02-14 16:38:18 +00:00
|
|
|
// fog_Func(fogType);
|
2010-03-12 22:25:19 +00:00
|
|
|
}
|