From 95c5c683e3003b89c956546dfa299853deea1e67 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Mon, 29 Oct 2018 17:41:38 +0000 Subject: [PATCH] Limit samplers to 8 in combined.frag. The additional palette sampler wasn't accounted for in the original PR. --- OpenRA.Game/Graphics/SpriteRenderer.cs | 2 +- glsl/combined.frag | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/OpenRA.Game/Graphics/SpriteRenderer.cs b/OpenRA.Game/Graphics/SpriteRenderer.cs index ddd8801488..f497cf4be3 100644 --- a/OpenRA.Game/Graphics/SpriteRenderer.cs +++ b/OpenRA.Game/Graphics/SpriteRenderer.cs @@ -20,7 +20,7 @@ namespace OpenRA.Graphics readonly IShader shader; readonly Vertex[] vertices; - readonly Sheet[] sheets = new Sheet[8]; + readonly Sheet[] sheets = new Sheet[7]; BlendMode currentBlend = BlendMode.Alpha; int nv = 0; diff --git a/glsl/combined.frag b/glsl/combined.frag index f78489f10c..441e1868dd 100644 --- a/glsl/combined.frag +++ b/glsl/combined.frag @@ -5,7 +5,6 @@ uniform sampler2D Texture3; uniform sampler2D Texture4; uniform sampler2D Texture5; uniform sampler2D Texture6; -uniform sampler2D Texture7; uniform sampler2D Palette; uniform bool EnableDepthPreview; @@ -50,10 +49,8 @@ vec4 Sample(float samplerIndex, vec2 pos) return texture2D(Texture4, pos); else if (samplerIndex < 5.5) return texture2D(Texture5, pos); - else if (samplerIndex < 6.5) - return texture2D(Texture6, pos); - return texture2D(Texture7, pos); + return texture2D(Texture6, pos); } void main()