mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Properly handle shading models with traditional fog when r_usetileshades is also enabled.
git-svn-id: https://svn.eduke32.com/eduke32@3766 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
872ea59160
commit
7e51e92a81
3 changed files with 6 additions and 3 deletions
|
@ -59,7 +59,9 @@ static inline float getshadefactor(int32_t shade)
|
|||
{
|
||||
int32_t shadebound = (shadescale_unbounded || shade>=numshades) ? numshades : numshades-1;
|
||||
float clamped_shade = min(max(shade*shadescale, 0), shadebound);
|
||||
if (rendmode == REND_POLYMOST && r_usetileshades && (!usehightile || !hicfindsubst(globalpicnum, globalpal, 0))) return 1.f;
|
||||
if (rendmode == REND_POLYMOST && r_usetileshades &&
|
||||
(!usehightile || !hicfindsubst(globalpicnum, globalpal, 0)) &&
|
||||
(!usemodels || md_tilehasmodel(globalpicnum, globalpal) < 0)) return 1.f;
|
||||
return ((float)(numshades-clamped_shade))/(float)numshades;
|
||||
}
|
||||
|
||||
|
|
|
@ -527,7 +527,8 @@ static inline void fogcalc(int32_t tile, int32_t shade, int32_t vis, int32_t pal
|
|||
Bmemcpy(fogcol, &fogtable[pal<<2], sizeof(fogcol));
|
||||
|
||||
if (getrendermode() == REND_POLYMOST && r_usetileshades && shade > 0 &&
|
||||
(!usehightile || !hicfindsubst(tile, pal, 0)))
|
||||
(!usehightile || !hicfindsubst(tile, pal, 0)) &&
|
||||
(!usemodels || md_tilehasmodel(tile, pal) < 0))
|
||||
shade >>= 1;
|
||||
|
||||
if (r_usenewshading!=2)
|
||||
|
|
|
@ -3197,7 +3197,7 @@ void G_DrawBackground(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
const int32_t MENUTILE = (getrendermode() == REND_CLASSIC ? MENUSCREEN : LOADSCREEN);
|
||||
const int32_t MENUTILE = MENUSCREEN;//(getrendermode() == REND_CLASSIC ? MENUSCREEN : LOADSCREEN);
|
||||
const int32_t fstilep = tilesizx[MENUTILE]==320 && tilesizy[MENUTILE]==200;
|
||||
int32_t bgtile = (fstilep ? MENUTILE : BIGHOLE);
|
||||
|
||||
|
|
Loading…
Reference in a new issue