mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-15 19:28:43 +12:00
d3d12: Make depth test optionnal and use (0,0,0,0) when texture unit is disabled
This commit is contained in:
parent
482a371bb0
commit
2f54482592
4 changed files with 11 additions and 3 deletions
|
@ -37,6 +37,7 @@ void D3D12FragmentDecompiler::insertHeader(std::stringstream & OS)
|
|||
OS << "cbuffer SCALE_OFFSET : register(b0)" << std::endl;
|
||||
OS << "{" << std::endl;
|
||||
OS << " float4x4 scaleOffsetMat;" << std::endl;
|
||||
OS << " int isAlphaTested;" << std::endl;
|
||||
OS << " float alphaRef;" << std::endl;
|
||||
OS << "};" << std::endl;
|
||||
}
|
||||
|
@ -162,7 +163,7 @@ void D3D12FragmentDecompiler::insertMainEnd(std::stringstream & OS)
|
|||
else if (m_parr.HasParam(PF_PARAM_NONE, "float4", table2[i].second))
|
||||
OS << " Out." << table2[i].first << " = " << table2[i].second << ";" << std::endl;
|
||||
}
|
||||
OS << " if (Out.ocol0.a <= alphaRef) discard;" << std::endl;
|
||||
OS << " if (isAlphaTested && Out.ocol0.a <= alphaRef) discard;" << std::endl;
|
||||
OS << " return Out;" << std::endl;
|
||||
OS << "}" << std::endl;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue