gl: Add missing input declarations for 2-sided lighting

This commit is contained in:
kd-11 2019-09-29 12:55:44 +03:00 committed by kd-11
parent 88229f4716
commit 7aed9c3f13
1 changed files with 13 additions and 0 deletions

View File

@ -79,6 +79,19 @@ void GLFragmentDecompilerThread::insertInputs(std::stringstream & OS)
OS << "layout(location=" << reg_location << ") in vec4 " << var_name << ";\n";
}
}
if (m_prog.two_sided_lighting)
{
if (properties.in_register_mask & in_diff_color)
{
OS << "layout(location=" << gl::get_varying_register_location("diff_color1") << ") in vec4 diff_color1;\n";
}
if (properties.in_register_mask & in_spec_color)
{
OS << "layout(location=" << gl::get_varying_register_location("spec_color1") << ") in vec4 spec_color1;\n";
}
}
}
void GLFragmentDecompilerThread::insertOutputs(std::stringstream & OS)