GL: Fix output swizzling for fog and clip distance

This commit is contained in:
vlj 2015-05-24 17:05:54 +02:00
parent dcad0e286a
commit 2dbac65613

View file

@ -85,9 +85,14 @@ void GLVertexDecompilerThread::insertOutputs(std::stringstream & OS, const std::
for (auto &i : reg_table)
{
if (m_parr.HasParam(PF_PARAM_NONE, "vec4", i.src_reg) && i.need_declare)
{
if (i.name == "fogc")
OS << "out float " << i.name << ";" << std::endl;
else
OS << "out vec4 " << i.name << ";" << std::endl;
}
}
}
void GLVertexDecompilerThread::insertMainStart(std::stringstream & OS)
@ -113,7 +118,7 @@ void GLVertexDecompilerThread::insertMainEnd(std::stringstream & OS)
for (auto &i : reg_table)
{
if (m_parr.HasParam(PF_PARAM_NONE, "vec4", i.src_reg))
OS << " " << i.name << " = " << i.src_reg << ";" << std::endl;
OS << " " << i.name << " = " << i.src_reg << i.src_reg_mask << ";" << std::endl;
}
OS << " gl_Position = gl_Position * scaleOffsetMat;" << std::endl;
OS << "}" << std::endl;