Fixed shader compilation.

This commit is contained in:
Jean-Philip Desjardins 2015-05-10 22:05:57 -04:00
parent 850aad5733
commit 5801895b1d

View File

@ -283,11 +283,11 @@ Framework::OpenGl::CShader CGSH_OpenGL::GenerateFragmentShader(const SHADERCAPS&
shaderBuilder << " float colorIndex = textureProj(g_texture, v_texCoord).r * 255.0;" << std::endl;
if(caps.texSourceMode == TEXTURE_SOURCE_MODE_IDX4)
{
shaderBuilder << " textureColor = texture2D(g_palette, vec2(colorIndex / 16.0, 1));" << std::endl;
shaderBuilder << " textureColor = texture(g_palette, vec2(colorIndex / 16.0, 1));" << std::endl;
}
else if(caps.texSourceMode == TEXTURE_SOURCE_MODE_IDX8)
{
shaderBuilder << " textureColor = texture2D(g_palette, vec2(colorIndex / 256.0, 1));" << std::endl;
shaderBuilder << " textureColor = texture(g_palette, vec2(colorIndex / 256.0, 1));" << std::endl;
}
}
}