softgpu: Respect negate normal flag without norm.

Per tests, Z is still negated even when using the previous normal value.
This commit is contained in:
Unknown W. Brackets committed 2022-10-20 23:09:48 -07:00
1 parent 7db6467af9
commit d6a59be012
1 file changed
+5 -10
+5 -10
View File
@@ -337,17 +337,12 @@ ClipVertexData TransformUnit::ReadVertex(VertexReader &vreader, const TransformS
vertex.v.texturecoords = lastTC;
}
Vec3f normal;
static Vec3f lastnormal;
if (vreader.hasNormal()) {
vreader.ReadNrm(normal.AsArray());
lastnormal = normal;
if (state.negateNormals)
normal = -normal;
} else {
normal = lastnormal;
}
if (vreader.hasNormal())
vreader.ReadNrm(lastnormal.AsArray());
Vec3f normal = lastnormal;
if (state.negateNormals)
normal = -normal;
if (state.readWeights) {
float W[8] = { 1.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f };