fix lumas missing on q3 bsps.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4693 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2014-06-22 23:44:30 +00:00
parent 5aba4ddeaa
commit 1943a1c5a0
2 changed files with 11 additions and 1 deletions

View File

@ -1954,6 +1954,7 @@ static qboolean Shaderpass_MapGen (shader_t *shader, shaderpass_t *pass, char *t
{
pass->texgen = T_GEN_FULLBRIGHT;
pass->tcgen = TC_GEN_BASE;
shader->flags |= SHADER_HASFULLBRIGHT;
}
else if (!Q_stricmp (tname, "$upperoverlay"))
{
@ -3929,8 +3930,16 @@ void QDECL R_BuildDefaultTexnums(texnums_t *tn, shader_t *shader)
}
TEXASSIGN(shader->defaulttextures.specular, tn->specular);
}
if (!TEXVALID(shader->defaulttextures.fullbright))
{
if ((shader->flags & SHADER_HASFULLBRIGHT) && r_fb_bmodels.value && gl_load24bit.value)
{
if (!TEXVALID(tn->fullbright))
tn->specular = R_LoadHiResTexture(va("%s_luma", imagename), NULL, 0);
}
TEXASSIGN(shader->defaulttextures.fullbright, tn->fullbright);
}
}
void Shader_DefaultScript(const char *shortname, shader_t *s, const void *args)

View File

@ -529,8 +529,9 @@ struct shader_s
SHADER_HASREFRACTDEPTH = 1 << 21, //refraction generation needs to generate a depth texture too.
SHADER_HASNORMALMAP = 1 << 22, //says that we need to load a normalmap texture
SHADER_HASRIPPLEMAP = 1 << 23, //water surface disturbances for water splashes
SHADER_HASGLOSS = 1 << 24, //
SHADER_HASGLOSS = 1 << 24, //needs a _spec texture, if possible.
SHADER_NOSHADOWS = 1 << 25, //don't cast shadows
SHADER_HASFULLBRIGHT = 1 << 26, //needs a fullbright texture, if possible.
} flags;
program_t *prog;