Fix wrong Quake 2 BSP rendering properties and serverinfo allow_skybox
1. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5618 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
7dfdd68dd5
commit
e655d13d0e
3 changed files with 8 additions and 2 deletions
|
@ -4981,7 +4981,7 @@ void ModBrush_LoadGLStuff(void *ctx, void *data, size_t a, size_t b)
|
||||||
// maps |= SHADER_HASNORMALMAP;
|
// maps |= SHADER_HASNORMALMAP;
|
||||||
if (gl_specular.ival)
|
if (gl_specular.ival)
|
||||||
maps |= SHADER_HASGLOSS;
|
maps |= SHADER_HASGLOSS;
|
||||||
R_BuildLegacyTexnums(mod->textures[a]->shader, mod->textures[a]->name, loadname, maps, IF_WORLDTEX, TF_MIP4_8PAL24, mod->textures[a]->width, mod->textures[a]->height, mod->textures[a]->mips, mod->textures[a]->palette);
|
R_BuildLegacyTexnums(mod->textures[a]->shader, mod->textures[a]->name, loadname, maps, IF_WORLDTEX, TF_MIP4_8PAL24_T255, mod->textures[a]->width, mod->textures[a]->height, mod->textures[a]->mips, mod->textures[a]->palette);
|
||||||
BZ_Free(mod->textures[a]->mips[0]);
|
BZ_Free(mod->textures[a]->mips[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6550,6 +6550,7 @@ void Shader_DefaultBSPQ2(parsestate_t *ps, const char *shortname, const void *ar
|
||||||
{
|
{
|
||||||
Shader_DefaultScript(ps, shortname,
|
Shader_DefaultScript(ps, shortname,
|
||||||
"{\n"
|
"{\n"
|
||||||
|
"sort sky\n"
|
||||||
"surfaceparm nodlight\n"
|
"surfaceparm nodlight\n"
|
||||||
"skyparms - - -\n"
|
"skyparms - - -\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
|
|
|
@ -79,7 +79,12 @@ void R_SetSky(const char *sky)
|
||||||
tex.reflectcube = R_LoadHiResTexture(sky, "env:gfx/env", IF_LOADNOW|IF_TEXTYPE_CUBE|IF_CLAMP);
|
tex.reflectcube = R_LoadHiResTexture(sky, "env:gfx/env", IF_LOADNOW|IF_TEXTYPE_CUBE|IF_CLAMP);
|
||||||
if (tex.reflectcube->width)
|
if (tex.reflectcube->width)
|
||||||
{
|
{
|
||||||
|
/* FIXME: Q2/HL require the skybox to not draw over geometry, shouldn't we force it? --eukara */
|
||||||
|
if (cls.allow_skyboxes) {
|
||||||
|
forcedsky = R_RegisterShader(va("skybox_%s", sky), 0, "{\nsort sky\nprogram defaultskybox\n{\nmap \"$cube:$reflectcube\"\ntcgen skybox\n}\nsurfaceparm nodlight\nsurfaceparm sky\n}");
|
||||||
|
} else {
|
||||||
forcedsky = R_RegisterShader(va("skybox_%s", sky), 0, "{\nsort sky\nprogram defaultskybox\n{\ndepthwrite\nmap \"$cube:$reflectcube\"\ntcgen skybox\n}\nsurfaceparm nodlight\nsurfaceparm sky\n}");
|
forcedsky = R_RegisterShader(va("skybox_%s", sky), 0, "{\nsort sky\nprogram defaultskybox\n{\ndepthwrite\nmap \"$cube:$reflectcube\"\ntcgen skybox\n}\nsurfaceparm nodlight\nsurfaceparm sky\n}");
|
||||||
|
}
|
||||||
R_BuildDefaultTexnums(&tex, forcedsky, IF_WORLDTEX);
|
R_BuildDefaultTexnums(&tex, forcedsky, IF_WORLDTEX);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue