mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
Amend r4394: don't use full brightness (glColor() factor 1) with hightiles.
This is done by factoring out some polymer.c:polymer_getbuildmaterial() code into polymer_eligible_for_artmapping() and using that. The one in polymer.c can still determine to not use ART mapping on some ("rare"?) occasions, so it's not 100% in sync. git-svn-id: https://svn.eduke32.com/eduke32@4407 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
2d889c74f7
commit
7da6380dcb
4 changed files with 10 additions and 2 deletions
|
@ -351,6 +351,12 @@ static inline void polymer_invalidateartmap(int32_t tilenum)
|
|||
}
|
||||
}
|
||||
|
||||
// Compare with eligible_for_tileshades()
|
||||
static inline int32_t polymer_eligible_for_artmap(int32_t tilenum, const pthtyp *pth)
|
||||
{
|
||||
return ((!pth || !pth->hicr) && tilenum < (MAXTILES - 4));
|
||||
}
|
||||
|
||||
# ifdef POLYMER_C
|
||||
|
||||
// CORE
|
||||
|
|
|
@ -56,6 +56,7 @@ extern int32_t r_usetileshades;
|
|||
extern int16_t globalpicnum;
|
||||
extern int32_t globalpal;
|
||||
|
||||
// Compare with polymer_eligible_for_artmap()
|
||||
static inline int32_t eligible_for_tileshades(int32_t picnum, int32_t pal)
|
||||
{
|
||||
return (!usehightile || !hicfindsubst(picnum, pal, 0)) &&
|
||||
|
|
|
@ -4621,7 +4621,7 @@ static void polymer_getbuildmaterial(_prmaterial* material, int16_t tile
|
|||
}
|
||||
|
||||
// Lazily fill in all the textures we need, move this to precaching later
|
||||
if (pr_artmapping && (!pth || !pth->hicr) && tilenum < (MAXTILES - 4)) {
|
||||
if (pr_artmapping && polymer_eligible_for_artmap(tilenum, pth)) {
|
||||
if (!prartmaps[tilenum]) {
|
||||
char *tilebuffer = (char *)waloff[tilenum];
|
||||
char *tempbuffer = (char *)Bmalloc(tilesizx[tilenum] * tilesizy[tilenum]);
|
||||
|
|
|
@ -1526,7 +1526,8 @@ void drawpoly(double *dpx, double *dpy, int32_t n, int32_t method)
|
|||
float pc[4];
|
||||
|
||||
#ifdef POLYMER
|
||||
if (getrendermode() == REND_POLYMER && pr_artmapping)
|
||||
if (getrendermode() == REND_POLYMER && pr_artmapping &&
|
||||
polymer_eligible_for_artmap(globalpicnum, pth))
|
||||
pc[0] = pc[1] = pc[2] = 1.0f;
|
||||
else
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue