1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00

Transform vertex normale with modelview matrix when LookAt is not used.

Fixed Quake 2 metallic effect in the menu is broken. #1279
This commit is contained in:
Sergey Lipskiy 2016-12-03 17:34:30 +07:00
parent 36fb0d1802
commit 74144d6126

View File

@ -576,6 +576,10 @@ void gSPProcessVertex(u32 v)
x = DotProduct(&gSP.lookat[0].ix, fLightDir);
y = DotProduct(&gSP.lookat[1].ix, fLightDir);
} else {
fLightDir[0] *= 128.0f;
fLightDir[1] *= 128.0f;
fLightDir[2] *= 128.0f;
TransformVectorNormalize(fLightDir, gSP.matrix.modelView[gSP.matrix.modelViewi]);
x = fLightDir[0];
y = fLightDir[1];
}