Translate lights into entity space.

Finally, lights work "properly". Probably the nicest lighting we've ever
had :) (still have to put in ambient, though).
This commit is contained in:
Bill Currie 2012-05-14 23:51:49 +09:00
parent 1375c3cf03
commit c454b96d2a

View file

@ -238,7 +238,7 @@ glsl_R_DrawIQM (void)
lightpar_t *l = &iqm_shader.lights[i];
if (!lights[i])
break;
VectorCopy (lights[i]->origin, val);
VectorSubtract (lights[i]->origin, ent->origin, val);
val[3] = lights[i]->radius;
qfeglUniform4fv (l->position.location, 1, val);
qfeglUniform4fv (l->color.location, 1, lights[i]->color);