GLSL, NSRenderableEntity: Added hack to prevent alphatesting against world

surfaces utilizing the default lightmapped shader.
This commit is contained in:
Marco Cawthorne 2021-12-31 01:47:47 -08:00
parent a1d63ff19a
commit 623754ec5a
Signed by: eukara
GPG key ID: C196CD8BA993248A
2 changed files with 4 additions and 0 deletions

View file

@ -128,6 +128,8 @@ varying mat3 invsurface;
/* get the alphatesting out of the way first */
#ifdef MASK
/* terrible hack, CSQC sets this to mark surface as an entity */
if (e_glowmod == vec3(1.0, 0.0, 1.0))
if (diffuse_f.a < 0.6) {
discard;
}

View file

@ -202,6 +202,8 @@ NSRenderableEntity::RenderFXPass(void)
pSeat = &g_seats[s];
vecPlayer = pSeat->m_vecPredictedOrigin;
/* HACK: this tells our GLSL to render this masked */
glowmod = [1.0,0.0,1.0];
colormod = m_vecRenderColor;
alpha = m_flRenderAmt;