softgpu: Multiply prev normal by world matrix.

Even when it's not in the vertex data, we still must multiply by the world
matrix.  Fixes some lighting issues in Nayuta no Kiseki.
This commit is contained in:
Unknown W. Brackets 2022-10-20 23:10:56 -07:00
parent d6a59be012
commit 6945604492

View File

@ -411,11 +411,9 @@ ClipVertexData TransformUnit::ReadVertex(VertexReader &vreader, const TransformS
vertex.v.clipw = vertex.clippos.w;
Vec3<float> worldnormal;
if (vreader.hasNormal()) {
if (state.enableLighting || state.uvGenMode == GE_TEXMAP_ENVIRONMENT_MAP) {
worldnormal = TransformUnit::ModelToWorldNormal(normal);
worldnormal.NormalizeOr001();
} else {
worldnormal = Vec3<float>(0.0f, 0.0f, 1.0f);
}
// Time to generate some texture coords. Lighting will handle shade mapping.