2012-02-12 15:51:09 +00:00
|
|
|
#version 120
|
2010-08-24 12:53:42 +00:00
|
|
|
varying vec4 rawpos;
|
|
|
|
varying vec4 ecPosition;
|
|
|
|
varying vec3 VNormal;
|
|
|
|
varying vec3 VTangent;
|
|
|
|
varying vec3 VBinormal;
|
|
|
|
varying vec3 Normal;
|
|
|
|
varying vec4 constantColor;
|
2010-08-21 11:10:19 +00:00
|
|
|
|
2010-08-24 12:53:42 +00:00
|
|
|
attribute vec3 tangent;
|
|
|
|
attribute vec3 binormal;
|
2010-08-21 11:10:19 +00:00
|
|
|
|
2012-02-14 16:38:18 +00:00
|
|
|
// ////fog "include"////////
|
|
|
|
// uniform int fogType;
|
|
|
|
//
|
|
|
|
// void fog_Func(int type);
|
|
|
|
// /////////////////////////
|
2012-02-12 15:51:09 +00:00
|
|
|
|
2020-11-10 00:45:54 +00:00
|
|
|
void setupShadows(vec4 eyeSpacePos);
|
|
|
|
|
2010-08-21 11:10:19 +00:00
|
|
|
void main(void)
|
|
|
|
{
|
|
|
|
rawpos = gl_Vertex;
|
2010-08-24 12:53:42 +00:00
|
|
|
ecPosition = gl_ModelViewMatrix * rawpos;
|
2010-08-21 11:10:19 +00:00
|
|
|
Normal = normalize(gl_Normal);
|
2010-08-24 12:53:42 +00:00
|
|
|
VNormal = gl_NormalMatrix * gl_Normal;
|
|
|
|
VTangent = gl_NormalMatrix * tangent;
|
|
|
|
VBinormal = gl_NormalMatrix * binormal;
|
|
|
|
|
|
|
|
gl_FrontColor = gl_Color;
|
|
|
|
constantColor = gl_FrontMaterial.emission
|
2012-02-12 15:51:09 +00:00
|
|
|
+ gl_FrontColor * (gl_LightModel.ambient + gl_LightSource[0].ambient);
|
2010-08-21 11:10:19 +00:00
|
|
|
gl_Position = ftransform();
|
2010-08-24 12:53:42 +00:00
|
|
|
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
2012-02-14 16:38:18 +00:00
|
|
|
// fog_Func(fogType);
|
2020-11-10 00:45:54 +00:00
|
|
|
setupShadows(ecPosition);
|
2010-08-21 11:10:19 +00:00
|
|
|
}
|