Support Sampler binding in the shader.

In the cases where we support the binding layout keyword, use it for more than binding UBO location.
This changes it so it is supported for samplers as well.

Instances when this is enabled is if a device supports GL_ARB_shading_language_420pack, or if it supports GLES 3.10.
This commit is contained in:
Ryan Houdek
2014-06-07 00:29:21 -05:00
parent b9dc69105d
commit bc9ef95643
51 changed files with 76 additions and 75 deletions

View File

@ -204,7 +204,7 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
{
// Declare samplers
for (int i = 0; i < 8; ++i)
out.Write("uniform sampler2D samp%d;\n", i);
out.Write("SAMPLER_BINDING(%d) uniform sampler2D samp%d;\n", i, i);
}
else // D3D
{