Fix silly light direction math bug (probably no effect mostly).

This commit is contained in:
Henrik Rydgard 2013-06-24 20:48:31 +02:00
parent f3c227041d
commit 8aca797f21

View file

@ -401,7 +401,7 @@ void LinkedShader::updateUniforms() {
len = 1.0f;
else
len = 1.0f / len;
float vec[3] = { x / len, y / len, z / len };
float vec[3] = { x * len, y * len, z * len };
if (u_lightpos[i] != -1) glUniform3fv(u_lightpos[i], 1, vec);
} else {
if (u_lightpos[i] != -1) glUniform3fv(u_lightpos[i], 1, gstate_c.lightpos[i]);