From d12762414a83d052f61c786d43fe6b438c7a036b Mon Sep 17 00:00:00 2001 From: kd-11 Date: Fri, 3 Jan 2020 00:48:46 +0300 Subject: [PATCH] vk: Change default vertex output value - Prefer w!=0 to avoid a situation where xyz/w = nan. More of a theoretical problem, but some calculations break down in such a situation. --- rpcs3/Emu/RSX/VK/VKVertexProgram.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp b/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp index 9a2bba4056..cde29797bf 100644 --- a/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp +++ b/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp @@ -258,7 +258,7 @@ void VKVertexDecompilerThread::insertMainEnd(std::stringstream & OS) { OS << " if (conditional_rendering_enabled != 0 && conditional_rendering_predicate == 0)\n"; OS << " {\n"; - OS << " gl_Position = vec4(0.);\n"; + OS << " gl_Position = vec4(0., 0., 0., -1.);\n"; OS << " return;\n"; OS << "}\n\n"; }