HW : Treat light type 3 as light type 2

This commit is contained in:
raven02 committed 2013-08-20 11:43:18 +08:00
1 parent 2820e5303f
commit 4e533adf52
1 file changed
+1
+1
View File
@@ -464,6 +464,7 @@ void GenerateVertexShader(int prim, char *buffer, bool useHWTransform) {
WRITE(p, " lightScale = clamp(1.0 / dot(u_lightatt%i, vec3(1.0, distance, distance*distance)), 0.0, 1.0);\n", i);
break;
case GE_LIGHTTYPE_SPOT:
case GE_LIGHTTYPE_UNKNOWN:
WRITE(p, " lowp float angle%i = dot(normalize(u_lightdir%i), toLight);\n", i, i);
WRITE(p, " if (angle%i >= u_lightangle%i) {\n", i, i);
WRITE(p, " lightScale = clamp(1.0 / dot(u_lightatt%i, vec3(1.0, distance, distance*distance)), 0.0, 1.0) * pow(angle%i, u_lightspotCoef%i);\n", i, i, i);