q3 shader parser was not supporting alphatest (promoted to alphablend) without trans...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 25 Jun 2005 21:51:35 +0000 (21:51 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 25 Jun 2005 21:51:35 +0000 (21:51 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5462 d7cf8633-e32d-0410-b094-e92efae38249

model_brush.c

index d867884..4815fbe 100644 (file)
@@ -3861,7 +3861,12 @@ static void Mod_Q3BSP_LoadTextures(lump_t *l)
                                                                        out->basematerialflags |= MATERIALFLAG_WATER | MATERIALFLAG_WATERALPHA;
                                                                else
                                                                        out->basematerialflags |= MATERIALFLAG_WALL;
-                                                               if (out->surfaceparms & Q3SURFACEPARM_TRANS)
+                                                               if (out->textureflags & Q3TEXTUREFLAG_ALPHATEST)
+                                                               {
+                                                                       // FIXME: support alpha test?
+                                                                       out->basematerialflags |= MATERIALFLAG_ALPHA | MATERIALFLAG_TRANSPARENT;
+                                                               }
+                                                               else if (out->surfaceparms & Q3SURFACEPARM_TRANS)
                                                                {
                                                                        if (out->textureflags & Q3TEXTUREFLAG_ADDITIVE)
                                                                                out->basematerialflags |= MATERIALFLAG_ADD | MATERIALFLAG_TRANSPARENT;