1
0
Fork 0
forked from fte/fteqw

Permission to kill the glass-shader hack.

It would have been cvar'd, but we figured it'd be a waste of LOC.
Handle this in the game-logic instead.


git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5663 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Eukara 2020-03-29 18:37:10 +00:00
parent cd21e68e3b
commit b8a81d1868
3 changed files with 2 additions and 22 deletions

View file

@ -381,8 +381,6 @@ qbyte *W_ConvertWAD3Texture(miptex_t *tex, size_t lumpsize, int *width, int *hei
if (tex->name[0] == '{')
alpha = 1;
else if (!strncmp(tex->name, "window", 6) || !strncmp(tex->name, "glass", 5))
alpha = 2;
if (tex->width > 0x10000 || tex->height > 0x10000)
return NULL;

View file

@ -4145,11 +4145,7 @@ static qboolean Mod_LoadFaces (model_t *loadmodel, bspx_header_t *bspx, qbyte *m
out->flags |= (SURF_DRAWALPHA);
continue;
}
if (!Q_strncmp(out->texinfo->texture->name,"glass",5)) // alpha
{
out->flags |= (SURF_DRAWALPHA);
continue;
}
if (out->flags & SURF_DRAWALPHA)
out->flags &= ~SURF_DRAWALPHA;
}

View file

@ -43,6 +43,7 @@ sh_config_t sh_config;
cvar_t r_vertexlight = CVARFD("r_vertexlight", "0", CVAR_SHADERSYSTEM, "Hack loaded shaders to remove detail pass and lightmap sampling for faster rendering.");
cvar_t r_forceprogramify = CVARAFD("r_forceprogramify", "0", "dpcompat_makeshitup", CVAR_SHADERSYSTEM, "Reduce the shader to a single texture, and then make stuff up about its mother. The resulting fist fight results in more colour when you shine a light upon its face.\nSet to 2 to ignore 'depthfunc equal' and 'tcmod scale' in order to tolerate bizzare shaders made for a bizzare engine.\nBecause most shaders made for DP are by people who _clearly_ have no idea what the heck they're doing, you'll typically need the '2' setting.");
cvar_t dpcompat_nopremulpics = CVARFD("dpcompat_nopremulpics", "0", CVAR_SHADERSYSTEM, "By default FTE uses premultiplied alpha for hud/2d images, while DP does not (which results in halos with low-res content). Unfortunately DDS files would need to be recompressed, resulting in visible issues.");
extern cvar_t r_glsl_offsetmapping_reliefmapping;
extern cvar_t r_drawflat;
extern cvar_t r_shaderblobs;
@ -6766,21 +6767,6 @@ void Shader_DefaultBSPQ1(parsestate_t *ps, const char *shortname, const void *ar
);
}
/*Hack: note that halflife would normally expect you to use rendermode/renderampt*/
if (!builtin && (!strncmp(shortname, "glass", 5)/* || !strncmp(shortname, "window", 6)*/))
{
/*alpha bended*/
builtin = (
"{\n"
"{\n"
"map $diffuse\n"
"tcgen base\n"
"blendfunc blend\n"
"}\n"
"}\n"
);
}
if (builtin)
Shader_DefaultScript(ps, shortname, builtin);
else