PixelShaderGen: Use arrays of texture samplers.

This commit is contained in:
Scott Mansell
2015-10-12 02:47:15 +13:00
parent dd5df05c01
commit 645e4cbbee
2 changed files with 11 additions and 13 deletions

View File

@ -88,11 +88,14 @@ void SHADER::SetProgramVariables()
if (GSBlock_id != -1)
glUniformBlockBinding(glprogid, GSBlock_id, 3);
// Bind Texture Sampler
// Bind Texture Samplers
for (int a = 0; a <= 9; ++a)
{
char name[8];
snprintf(name, 8, "samp%d", a);
char name[10];
if (a < 8)
snprintf(name, 8, "samp[%d]", a);
else
snprintf(name, 8, "samp%d", a);
// Still need to get sampler locations since we aren't binding them statically in the shaders
int loc = glGetUniformLocation(glprogid, name);