mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-08 16:01:42 +12:00
gl/vk: Flip wpos if origin != top
This commit is contained in:
parent
4f74cbe510
commit
38562155d4
4 changed files with 15 additions and 3 deletions
|
@ -250,6 +250,12 @@ void GLFragmentDecompilerThread::insertMainStart(std::stringstream & OS)
|
|||
}
|
||||
|
||||
OS << " vec4 ssa = gl_FrontFacing ? vec4(1.) : vec4(-1.);\n";
|
||||
OS << " vec4 wpos = gl_FragCoord;\n";
|
||||
|
||||
//Flip wpos in Y
|
||||
//We could optionally export wpos from the VS, but this is so much easier
|
||||
if (m_prog.origin_mode == rsx::window_origin::bottom)
|
||||
OS << " wpos.y = " << std::to_string(m_prog.height) << " - wpos.y;\n";
|
||||
|
||||
for (const ParamType& PT : m_parr.params[PF_PARAM_UNIFORM])
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue