Edit:Kinda forgot about this thread, but I managed to figure it out

I can't remember exactly what the problem was, but I think it was my lighting calculations.
Also, if anyone wants a tutorial on how to get this all setup, just PM me and I'll post it.
Anyway, here is the new code (I removed self-illumination, specular reflections, attenuation and the lighting mask from this)
Per-model shader
[Vertex_Shader]
varying vec3 viewSpaceNormal, viewSpacePosition;
void main()
{
gl_TexCoord[0] = gl_MultiTexCoord0;
viewSpaceNormal = gl_NormalMatrix * gl_Normal;
viewSpacePosition = gl_ModelViewMatrix * gl_Vertex;
gl_Position = ftransform();
}
[Pixel_Shader]
varying vec3 viewSpaceNormal, viewSpacePosition;
uniform sampler2D diffuseTexture;
void main()
{
vec3 diffuse = gl_FrontMaterial.diffuse * texture2D(diffuseTexture, gl_TexCoord[0]).rgb;
vec3 normal = viewSpaceNormal.xyz;
vec3 position = viewSpacePosition.xyz;
gl_FragData[0] = vec4(diffuse, 1.0);
gl_FragData[1] = vec4(normal, 1.0);
gl_FragData[2] = vec4(position, 1.0);
}
And the deferred shader
[Vertex_Shader]
void main()
{
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_Position = ftransform();
}
[Pixel_Shader]
uniform sampler2D screenDiffuse;
uniform sampler2D screenNormal;
uniform sampler2D screenPosition;
uniform vec3 globalAmbient;
uniform int lightCount;
void main()
{
vec3 diffuse = texture2D(screenDiffuse, gl_TexCoord[0]).rgb;
vec3 lighting = globalAmbient;
vec3 normal = texture2D(screenNormal, gl_TexCoord[0]).rgb;
vec3 position = texture2D(screenPosition, gl_TexCoord[0]).rgb;
vec3 lightDirection;
for(int i = 0; i < lightCount; i++) {
lightDirection = gl_LightSource[i].position - position;
lighting += gl_LightSource[i].diffuse * max(dot(normalize(lightDirection), normalize(normal)), 0.0);
}
gl_FragColor = vec4(diffuse * lighting, 1.0);
}
--
Daniel