1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-26 04:32:35 +01:00

d3d12/gl: Supports SSA in Fragment Shader.

This commit is contained in:
Vincent Lejeune 2016-02-22 21:53:46 +01:00
parent a6d8d1144c
commit 62246f75c8
2 changed files with 5 additions and 0 deletions

View File

@ -169,6 +169,8 @@ void D3D12FragmentDecompiler::insertMainStart(std::stringstream & OS)
continue;
}
}
if (PI.name == "ssa")
continue;
OS << " " << PT.type << " " << PI.name << " = In." << PI.name << ";" << std::endl;
}
}
@ -176,6 +178,7 @@ void D3D12FragmentDecompiler::insertMainStart(std::stringstream & OS)
OS << " " << "float4 gl_FragCoord = In.Position;" << std::endl;
if (m_prog.origin_mode == rsx::window_origin::bottom)
OS << " gl_FragCoord.y = (" << std::to_string(m_prog.height) << " - gl_FragCoord.y);\n";
OS << " float4 ssa = is_front_face ? float4(1., 1., 1., 1.) : float4(-1., -1., -1., -1.);\n";
// Declare output
for (const ParamType &PT : m_parr.params[PF_PARAM_NONE])
{

View File

@ -116,6 +116,8 @@ void GLFragmentDecompilerThread::insertMainStart(std::stringstream & OS)
OS << ";" << std::endl;
}
}
OS << " vec4 ssa = gl_FrontFacing ? vec4(1.) : vec4(-1.);\n";
}
void GLFragmentDecompilerThread::insertMainEnd(std::stringstream & OS)