mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-05 22:41:18 +12:00
use depth mask when writing to depth
This commit is contained in:
parent
21e7466670
commit
2a218d418f
5 changed files with 17 additions and 8 deletions
|
@ -387,7 +387,7 @@ void LatteDecompiler_analyzeExport(LatteDecompilerShaderContext* shaderContext,
|
|||
LatteDecompilerShader* shader = shaderContext->shader;
|
||||
if( shader->shaderType == LatteConst::ShaderType::Pixel )
|
||||
{
|
||||
if( cfInstruction->exportType == 0 && cfInstruction->exportArrayBase < 8 )
|
||||
if (cfInstruction->exportType == 0 && cfInstruction->exportArrayBase < 8)
|
||||
{
|
||||
// remember color outputs that are written
|
||||
for(uint32 i=0; i<(cfInstruction->exportBurstCount+1); i++)
|
||||
|
@ -396,9 +396,10 @@ void LatteDecompiler_analyzeExport(LatteDecompilerShaderContext* shaderContext,
|
|||
shader->pixelColorOutputMask |= (1<<colorOutputIndex);
|
||||
}
|
||||
}
|
||||
else if( cfInstruction->exportType == 0 && cfInstruction->exportArrayBase == 61 )
|
||||
else if (cfInstruction->exportType == 0 && cfInstruction->exportArrayBase == 61)
|
||||
{
|
||||
shader->depthWritten = true;
|
||||
if (LatteMRT::GetActiveDepthBufferMask(*shaderContext->contextRegistersNew))
|
||||
shader->depthMask = true;
|
||||
}
|
||||
else
|
||||
debugBreakpoint();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue