don't transform depth to 0...1

This commit is contained in:
Samuliak 2024-11-14 18:48:27 +01:00
parent 5b7a0fa3f6
commit c9b18efc03
No known key found for this signature in database

View File

@ -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)