From c9b18efc031e185cce3f888119222c7c7af53f9f Mon Sep 17 00:00:00 2001 From: Samuliak Date: Thu, 14 Nov 2024 18:48:27 +0100 Subject: [PATCH] don't transform depth to 0...1 --- .../Latte/LegacyShaderDecompiler/LatteDecompilerEmitMSL.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompilerEmitMSL.cpp b/src/Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompilerEmitMSL.cpp index 315354dd..7728e007 100644 --- a/src/Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompilerEmitMSL.cpp +++ b/src/Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompilerEmitMSL.cpp @@ -3609,7 +3609,7 @@ void LatteDecompiler_emitClauseCodeMSL(LatteDecompilerShaderContext* shaderConte // write point size if (shaderContext->analyzer.outputPointSize && shaderContext->analyzer.writesPointSize == false) src->add("out.pointSize = supportBuffer.pointSize;" _CRLF); - src->add("out.position.z = (out.position.z + out.position.w) / 2.0;" _CRLF); + //src->add("out.position.z = (out.position.z + out.position.w) / 2.0;" _CRLF); src->add("mesh.set_vertex(vertexIndex, out);" _CRLF); src->add("vertexIndex++;" _CRLF); // increment transform feedback pointer @@ -4378,8 +4378,8 @@ void LatteDecompiler_emitMSLShader(LatteDecompilerShaderContext* shaderContext, if (rasterizationEnabled) { - if (shader->shaderType == LatteConst::ShaderType::Vertex && !shaderContext->options->usesGeometryShader) - src->add("out.position.z = (out.position.z + out.position.w) / 2.0;" _CRLF); + //if (shader->shaderType == LatteConst::ShaderType::Vertex && !shaderContext->options->usesGeometryShader) + // src->add("out.position.z = (out.position.z + out.position.w) / 2.0;" _CRLF); // Return if (!usesGeometryShader || shader->shaderType == LatteConst::ShaderType::Pixel)