GL: Fix output swizzling for fog and clip distance
This commit is contained in:
@@ -85,9 +85,14 @@ void GLVertexDecompilerThread::insertOutputs(std::stringstream & OS, const std::
|
|||||||
for (auto &i : reg_table)
|
for (auto &i : reg_table)
|
||||||
{
|
{
|
||||||
if (m_parr.HasParam(PF_PARAM_NONE, "vec4", i.src_reg) && i.need_declare)
|
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;
|
OS << "out vec4 " << i.name << ";" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void GLVertexDecompilerThread::insertMainStart(std::stringstream & OS)
|
void GLVertexDecompilerThread::insertMainStart(std::stringstream & OS)
|
||||||
@@ -113,7 +118,7 @@ void GLVertexDecompilerThread::insertMainEnd(std::stringstream & OS)
|
|||||||
for (auto &i : reg_table)
|
for (auto &i : reg_table)
|
||||||
{
|
{
|
||||||
if (m_parr.HasParam(PF_PARAM_NONE, "vec4", i.src_reg))
|
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 << " gl_Position = gl_Position * scaleOffsetMat;" << std::endl;
|
||||||
OS << "}" << std::endl;
|
OS << "}" << std::endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user