GL: minor fixes (#2105)

* Minor fixes

* temporary disable 2-sided lighting

* Disable user clip planes until they are properly handled
This commit is contained in:
raven02 2016-08-27 14:12:44 +08:00 committed by GitHub
parent 6e07e07cd0
commit bb66b97251
3 changed files with 30 additions and 142 deletions

View file

@ -46,15 +46,6 @@ void GLFragmentDecompilerThread::insertIntputs(std::stringstream & OS)
{
for (const ParamItem& PI : PT.items)
{
if (m_prog.front_back_color_enabled)
{
if (PI.name == "diff_color" && m_prog.back_color_diffuse_output)
OS << "in vec4 back_diff_color;" << std::endl;
if (PI.name == "spec_color" && m_prog.back_color_specular_output)
OS << "in vec4 back_spec_color;" << std::endl;
}
//Rename fogc to fog_c to differentiate the input register from the variable
if (PI.name == "fogc")
OS << "in vec4 fog_c;" << std::endl;
@ -62,16 +53,6 @@ void GLFragmentDecompilerThread::insertIntputs(std::stringstream & OS)
OS << "in " << PT.type << " " << PI.name << ";" << std::endl;
}
}
if (m_prog.front_back_color_enabled)
{
if (m_prog.front_color_diffuse_output)
OS << "in vec4 front_diff_color;" << std::endl;
if (m_prog.front_color_specular_output)
OS << "in vec4 front_spec_color;" << std::endl;
}
}
void GLFragmentDecompilerThread::insertOutputs(std::stringstream & OS)
@ -207,20 +188,6 @@ void GLFragmentDecompilerThread::insertMainStart(std::stringstream & OS)
{
for (const ParamItem& PI : PT.items)
{
if (m_prog.front_back_color_enabled)
{
if (PI.name == "spec_color" && m_prog.back_color_specular_output)
{
OS << " vec4 spec_color = gl_FrontFacing ? front_spec_color : spec_color;\n";
continue;
}
if (PI.name == "diff_color" && m_prog.back_color_diffuse_output)
{
OS << " vec4 diff_color = gl_FrontFacing ? front_diff_color : diff_color;\n";
continue;
}
}
if (PI.name == "fogc")
{
insert_fog_declaration(OS, m_prog.fog_equation);