mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Correct shaders generation when hw light is enabled.
This commit is contained in:
parent
6c9211a38f
commit
683e22c3b3
|
@ -1764,7 +1764,8 @@ graphics::CombinerProgram * CombinerProgramBuilder::buildCombinerProgram(Combine
|
||||||
|
|
||||||
const bool bUseLod = combinerInputs.usesLOD();
|
const bool bUseLod = combinerInputs.usesLOD();
|
||||||
const bool bUseTextures = combinerInputs.usesTexture();
|
const bool bUseTextures = combinerInputs.usesTexture();
|
||||||
const bool bUseHWLight = g_cycleType <= G_CYC_2CYCLE && // Rects not use lighting
|
const bool bIsRect = _key.isRectKey();
|
||||||
|
const bool bUseHWLight = !bIsRect && // Rects not use lighting
|
||||||
config.generalEmulation.enableHWLighting != 0 &&
|
config.generalEmulation.enableHWLighting != 0 &&
|
||||||
GBI.isHWLSupported() &&
|
GBI.isHWLSupported() &&
|
||||||
combinerInputs.usesShadeColor();
|
combinerInputs.usesShadeColor();
|
||||||
|
@ -1876,7 +1877,6 @@ graphics::CombinerProgram * CombinerProgramBuilder::buildCombinerProgram(Combine
|
||||||
Utils::logErrorShader(GL_FRAGMENT_SHADER, strFragmentShader);
|
Utils::logErrorShader(GL_FRAGMENT_SHADER, strFragmentShader);
|
||||||
|
|
||||||
GLuint program = glCreateProgram();
|
GLuint program = glCreateProgram();
|
||||||
const bool bIsRect = _key.isRectKey();
|
|
||||||
Utils::locateAttributes(program, bIsRect, bUseTextures);
|
Utils::locateAttributes(program, bIsRect, bUseTextures);
|
||||||
if (bIsRect)
|
if (bIsRect)
|
||||||
glAttachShader(program, bUseTextures ? m_vertexShaderTexturedRect : m_vertexShaderRect);
|
glAttachShader(program, bUseTextures ? m_vertexShaderTexturedRect : m_vertexShaderRect);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user