mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-06 00:40:11 +00:00
Fragment position is given as gl_FragCoord not gl_Position
Fix references to gl_Position in Dx12
This commit is contained in:
parent
f7f4c049fc
commit
843d0ed298
@ -274,7 +274,7 @@ template<typename T> std::string FragmentProgramDecompiler::GetSRC(T src)
|
|||||||
{
|
{
|
||||||
static const std::string reg_table[] =
|
static const std::string reg_table[] =
|
||||||
{
|
{
|
||||||
"gl_Position",
|
"gl_FragCoord",
|
||||||
"diff_color", "spec_color",
|
"diff_color", "spec_color",
|
||||||
"fogc",
|
"fogc",
|
||||||
"tc0", "tc1", "tc2", "tc3", "tc4", "tc5", "tc6", "tc7", "tc8", "tc9",
|
"tc0", "tc1", "tc2", "tc3", "tc4", "tc5", "tc6", "tc7", "tc8", "tc9",
|
||||||
|
@ -173,9 +173,9 @@ void D3D12FragmentDecompiler::insertMainStart(std::stringstream & OS)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// A bit unclean, but works.
|
// A bit unclean, but works.
|
||||||
OS << " " << "float4 gl_Position = In.Position;" << std::endl;
|
OS << " " << "float4 gl_FragCoord = In.Position;" << std::endl;
|
||||||
if (m_prog.origin_mode == rsx::window_origin::bottom)
|
if (m_prog.origin_mode == rsx::window_origin::bottom)
|
||||||
OS << " gl_Position.y = (" << std::to_string(m_prog.height) << " - gl_Position.y);\n";
|
OS << " gl_FragCoord.y = (" << std::to_string(m_prog.height) << " - gl_FragCoord.y);\n";
|
||||||
// Declare output
|
// Declare output
|
||||||
for (const ParamType &PT : m_parr.params[PF_PARAM_NONE])
|
for (const ParamType &PT : m_parr.params[PF_PARAM_NONE])
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user