Well, here are both the VS and FS (I’ve stripped them to the bare minimum):

Vertex shader:

varying vec4 ambientGlobal;

varying vec3 normal;

varying vec3 lightDir0, lightDir1, lightDir2;

varying float dist0, dist1, dist2;

void main()

{

vec4 ecPos;

vec3 aux;

```
normal = normalize(gl_NormalMatrix * gl_Normal);
ecPos = gl_ModelViewMatrix * gl_Vertex;
// Light0
aux = vec3(gl_LightSource[0].position-ecPos);
lightDir0 = normalize(aux);
dist0 = length(aux);
// Light1
aux = vec3(gl_LightSource[1].position-ecPos);
lightDir1 = normalize(aux);
dist1 = length(aux);
// Light2
aux = vec3(gl_LightSource[2].position-ecPos);
lightDir2 = normalize(aux);
dist2 = length(aux);
ambientGlobal = gl_LightModel.ambient * gl_FrontMaterial.ambient;
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_TexCoord[1] = gl_MultiTexCoord1;
gl_Position = ftransform();
```

}

Fragment shader:

varying vec4 ambientGlobal;

varying vec3 normal;

varying vec3 lightDir0, lightDir1, lightDir2;

varying float dist0, dist1, dist2;

uniform sampler2D tex;

uniform sampler2D texLm;

uniform vec4 lightCol0, lightCol1, lightCol2;

uniform int addGlow, hasLightMap;

uniform vec4 glowColor;

void main()

{

vec3 n;

float NdotL;

vec4 color = ambientGlobal;

vec4 color2;

```
n = normalize(normal);
// Light0
NdotL = max(dot(n,normalize(lightDir0)),0.1);
color += NdotL / (dist0*lightCol0);
// Light1
NdotL = max(dot(n,normalize(lightDir1)),0.1);
color += NdotL / (dist1*lightCol1);
// Light2
NdotL = max(dot(n,normalize(lightDir2)),0.1);
color += NdotL / (dist2*lightCol2);
gl_FragColor = texture2D(tex,gl_TexCoord[0].st)*color;
if (hasLightMap == 1 && addGlow == 1)
{
if (texture2D(texLm,gl_TexCoord[0].st) != vec4(0,0,0,0))
gl_FragColor += glowColor;
}
```

}