glsl: unbreak lightmapped surfaces

This commit is contained in:
Marco Cawthorne 2024-12-30 02:22:35 -08:00
parent 247f186a68
commit 64f4e2a10a
2 changed files with 4 additions and 2 deletions

View file

@ -2050,10 +2050,10 @@ static qboolean Shader_LoadPermutations(char *name, program_t *prog, char *scrip
nopermutation |= PERMUTATION_SKELETAL;
//multiple lightmaps is kinda hacky. if any are set, all must be.
#define ALTLIGHTMAPSAMP 14
#define ALTLIGHTMAPSAMP 16
if (prog->defaulttextures & ((1u<<(ALTLIGHTMAPSAMP+0)) | (1u<<(ALTLIGHTMAPSAMP+1)) | (1u<<(ALTLIGHTMAPSAMP+2))))
prog->defaulttextures |=((1u<<(ALTLIGHTMAPSAMP+0)) | (1u<<(ALTLIGHTMAPSAMP+1)) | (1u<<(ALTLIGHTMAPSAMP+2)));
#define ALTDELUXMAPSAMP 17
#define ALTDELUXMAPSAMP 19
if (prog->defaulttextures & ((1u<<(ALTDELUXMAPSAMP+0)) | (1u<<(ALTDELUXMAPSAMP+1)) | (1u<<(ALTDELUXMAPSAMP+2))))
prog->defaulttextures |=((1u<<(ALTDELUXMAPSAMP+0)) | (1u<<(ALTDELUXMAPSAMP+1)) | (1u<<(ALTDELUXMAPSAMP+2)));

View file

@ -2432,6 +2432,8 @@ static GLuint GLSlang_CreateShader (program_t *prog, const char *name, int ver,
"uniform sampler2D s_reflectmask;\n",
"uniform sampler2D s_displacement;\n",
"uniform sampler2D s_occlusion;\n",
"uniform sampler2D s_transmission;\n",
"uniform sampler2D s_thickness;\n",
"uniform sampler2D s_lightmap;\n#define s_lightmap0 s_lightmap\n",
"uniform sampler2D s_deluxemap;\n#define s_deluxemap0 s_deluxemap\n",