mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-12 23:44:39 +00:00
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:
parent
5aba4ddeaa
commit
1943a1c5a0
2 changed files with 11 additions and 1 deletions
|
@ -1954,6 +1954,7 @@ static qboolean Shaderpass_MapGen (shader_t *shader, shaderpass_t *pass, char *t
|
||||||
{
|
{
|
||||||
pass->texgen = T_GEN_FULLBRIGHT;
|
pass->texgen = T_GEN_FULLBRIGHT;
|
||||||
pass->tcgen = TC_GEN_BASE;
|
pass->tcgen = TC_GEN_BASE;
|
||||||
|
shader->flags |= SHADER_HASFULLBRIGHT;
|
||||||
}
|
}
|
||||||
else if (!Q_stricmp (tname, "$upperoverlay"))
|
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);
|
TEXASSIGN(shader->defaulttextures.specular, tn->specular);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!TEXVALID(shader->defaulttextures.fullbright))
|
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);
|
TEXASSIGN(shader->defaulttextures.fullbright, tn->fullbright);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Shader_DefaultScript(const char *shortname, shader_t *s, const void *args)
|
void Shader_DefaultScript(const char *shortname, shader_t *s, const void *args)
|
||||||
|
|
|
@ -529,8 +529,9 @@ struct shader_s
|
||||||
SHADER_HASREFRACTDEPTH = 1 << 21, //refraction generation needs to generate a depth texture too.
|
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_HASNORMALMAP = 1 << 22, //says that we need to load a normalmap texture
|
||||||
SHADER_HASRIPPLEMAP = 1 << 23, //water surface disturbances for water splashes
|
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_NOSHADOWS = 1 << 25, //don't cast shadows
|
||||||
|
SHADER_HASFULLBRIGHT = 1 << 26, //needs a fullbright texture, if possible.
|
||||||
} flags;
|
} flags;
|
||||||
|
|
||||||
program_t *prog;
|
program_t *prog;
|
||||||
|
|
Loading…
Reference in a new issue