Merge pull request #3164 from phire/samplerArrays

PixelShaderGen: Use arrays of texture samplers.
This commit is contained in:
flacs
2015-10-12 18:44:14 +02:00
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);