d3d12/gl: Use r1 as depth output.

The "Output_from_h0" flag seems to concern color output.
There might be another flag for depth from half float value.
This commit is contained in:
Vincent Lejeune 2016-01-15 17:29:28 +01:00
parent df3fddc026
commit 6aac972bda
2 changed files with 23 additions and 5 deletions

View file

@ -133,7 +133,17 @@ void GLFragmentDecompilerThread::insertMainEnd(std::stringstream & OS)
}
if (m_ctrl & CELL_GCM_SHADER_CONTROL_DEPTH_EXPORT)
OS << ((m_ctrl & CELL_GCM_SHADER_CONTROL_32_BITS_EXPORTS) ? "\tgl_FragDepth = r1.z;\n" : "\tgl_FragDepth = h0.z;\n") << std::endl;
{
{
/** Note: Naruto Shippuden : Ultimate Ninja Storm 2 sets CELL_GCM_SHADER_CONTROL_32_BITS_EXPORTS in a shader
* but it writes depth in r1.z and not h2.z.
* Maybe there's a different flag for depth ?
*/
//OS << ((m_ctrl & CELL_GCM_SHADER_CONTROL_32_BITS_EXPORTS) ? "\tgl_FragDepth = r1.z;\n" : "\tgl_FragDepth = h0.z;\n") << std::endl;
OS << " gl_FragDepth = r1.z;\n";
}
}
OS << "}" << std::endl;
}