| 1 |
#version 120 |
| 2 |
uniform bool lighting; |
| 3 |
varying vec3 nor, lightDirection, normal, uv, pos,eye; |
| 4 |
varying vec4 gcolor; |
| 5 |
varying float ep,np; |
| 6 |
void main(void){ |
| 7 |
nor=gl_Normal; |
| 8 |
gcolor=gl_Color; |
| 9 |
uv = gl_Vertex.xyz; |
| 10 |
if (lighting){ |
| 11 |
normal = gl_NormalMatrix * gl_Normal; |
| 12 |
vec4 eyePos = gl_ModelViewMatrixInverse * vec4(0., 0., 0., 1.); |
| 13 |
eye = eyePos.xyz - gl_Vertex.xyz; |
| 14 |
lightDirection=normalize(vec3(-1.0,1.0,1.0)); |
| 15 |
pos = (gl_ModelViewMatrix * gl_Vertex).xyz; |
| 16 |
} |
| 17 |
gl_Position = ftransform(); |
| 18 |
} |