From b436903a28b02478e062b95914b3eb1d8580b56f Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Mon, 19 Feb 2024 13:14:53 +0100 Subject: [PATCH] Use constants as bad boys and girls seem to be shadowing the global variables :p --- .../shaders/scene/binding_textures.glsl | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/wadsrc/static/shaders/scene/binding_textures.glsl b/wadsrc/static/shaders/scene/binding_textures.glsl index f7a6610cc..3ef32bc69 100644 --- a/wadsrc/static/shaders/scene/binding_textures.glsl +++ b/wadsrc/static/shaders/scene/binding_textures.glsl @@ -1,23 +1,23 @@ layout(set = 2, binding = 0) uniform sampler2D textures[]; -#define tex 0 -#define texture2 1 -#define texture3 2 -#define texture4 3 -#define texture5 4 -#define texture6 5 -#define texture7 6 -#define texture8 7 -#define texture9 8 -#define texture10 9 -#define texture11 10 -#define texture12 11 -#define texture13 12 -#define texture14 13 -#define texture15 14 -#define texture16 15 -#define texture17 16 -#define texture18 17 -#define texture19 18 -#define texture20 19 +const int tex = 0; +const int texture2 = 1; +const int texture3 = 2; +const int texture4 = 3; +const int texture5 = 4; +const int texture6 = 5; +const int texture7 = 6; +const int texture8 = 7; +const int texture9 = 8; +const int texture10 = 9; +const int texture11 = 10; +const int texture12 = 11; +const int texture13 = 12; +const int texture14 = 13; +const int texture15 = 14; +const int texture16 = 15; +const int texture17 = 16; +const int texture18 = 17; +const int texture19 = 18; +const int texture20 = 19;