From 5e9ab28ed18d06dfd35e3255c913c1c8d1b25a8c Mon Sep 17 00:00:00 2001 From: degasus Date: Sat, 19 Dec 2015 10:51:42 +0100 Subject: [PATCH] VideoSW: Clear normal vertex data. This data might not be initialized but used for lighting. This matches our ShaderGen usage in VertexShaderGen.cpp:166. --- Source/Core/VideoBackends/Software/SWVertexLoader.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Core/VideoBackends/Software/SWVertexLoader.cpp b/Source/Core/VideoBackends/Software/SWVertexLoader.cpp index 1da69c5859..260c0b1d41 100644 --- a/Source/Core/VideoBackends/Software/SWVertexLoader.cpp +++ b/Source/Core/VideoBackends/Software/SWVertexLoader.cpp @@ -196,6 +196,7 @@ void SWVertexLoader::LoadVertex() // transform this vertex so that it can be used for rasterization (outVertex) OutputVertexData* outVertex = m_SetupUnit->GetVertex(); TransformUnit::TransformPosition(&m_Vertex, outVertex); + memset(&outVertex->normal, 0, sizeof(outVertex->normal)); if (g_main_cp_state.vtx_desc.Normal != NOT_PRESENT) { TransformUnit::TransformNormal(&m_Vertex, m_CurrentVat->g0.NormalElements, outVertex);