Limit samplers to 8 in combined.frag.

The additional palette sampler wasn't accounted
for in the original PR.
This commit is contained in:
Paul Chote
2018-10-29 17:41:38 +00:00
committed by abcdefg30
parent a12bb54ded
commit 95c5c683e3
2 changed files with 2 additions and 5 deletions

View File

@@ -20,7 +20,7 @@ namespace OpenRA.Graphics
readonly IShader shader; readonly IShader shader;
readonly Vertex[] vertices; readonly Vertex[] vertices;
readonly Sheet[] sheets = new Sheet[8]; readonly Sheet[] sheets = new Sheet[7];
BlendMode currentBlend = BlendMode.Alpha; BlendMode currentBlend = BlendMode.Alpha;
int nv = 0; int nv = 0;

View File

@@ -5,7 +5,6 @@ uniform sampler2D Texture3;
uniform sampler2D Texture4; uniform sampler2D Texture4;
uniform sampler2D Texture5; uniform sampler2D Texture5;
uniform sampler2D Texture6; uniform sampler2D Texture6;
uniform sampler2D Texture7;
uniform sampler2D Palette; uniform sampler2D Palette;
uniform bool EnableDepthPreview; uniform bool EnableDepthPreview;
@@ -50,10 +49,8 @@ vec4 Sample(float samplerIndex, vec2 pos)
return texture2D(Texture4, pos); return texture2D(Texture4, pos);
else if (samplerIndex < 5.5) else if (samplerIndex < 5.5)
return texture2D(Texture5, pos); return texture2D(Texture5, pos);
else if (samplerIndex < 6.5)
return texture2D(Texture6, pos);
return texture2D(Texture7, pos); return texture2D(Texture6, pos);
} }
void main() void main()