Fullbright walls and sectors

git-svn-id: https://svn.eduke32.com/eduke32@202 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-07-02 19:38:22 +00:00
parent 504cbf9b88
commit 957a48fb23

View file

@ -2206,7 +2206,9 @@ static void polymost_drawalls (long bunch)
col[2] = (float)palookupfog[sec->floorpal].b / 63.f; col[2] = (float)palookupfog[sec->floorpal].b / 63.f;
col[3] = 0; col[3] = 0;
bglFogfv(GL_FOG_COLOR,col); bglFogfv(GL_FOG_COLOR,col);
bglFogf(GL_FOG_DENSITY,gvisibility*((float)((unsigned char)(sec->visibility+16)))); bglFogf(GL_FOG_DENSITY,gvisibility/(sec->floorshade<0?klabs(sec->floorshade):1)*((float)((unsigned char)(sec->visibility+16))));
// bglFogf(GL_FOG_DENSITY,gvisibility*((float)((unsigned char)(sec->visibility+16))));
} }
} }
#endif #endif
@ -3042,7 +3044,14 @@ static void polymost_drawalls (long bunch)
} }
if (wal->cstat&256) { gvx = -gvx; gvy = -gvy; gvo = -gvo; } //yflip if (wal->cstat&256) { gvx = -gvx; gvy = -gvy; gvo = -gvo; } //yflip
{
float oldfogval;
bglGetFloatv(GL_FOG_DENSITY,&oldfogval);
bglFogf(GL_FOG_DENSITY,gvisibility/(wal->shade<0?klabs(wal->shade):1)*((float)((unsigned char)(sec->visibility+16))));
pow2xsplit = 1; domost(x1,ocy1,x0,ocy0); pow2xsplit = 1; domost(x1,ocy1,x0,ocy0);
bglFogf(GL_FOG_DENSITY,oldfogval);
}
if (wal->cstat&8) { gux = ogux; guy = oguy; guo = oguo; } if (wal->cstat&8) { gux = ogux; guy = oguy; guo = oguo; }
} }
@ -3078,7 +3087,14 @@ static void polymost_drawalls (long bunch)
} }
if (nwal->cstat&256) { gvx = -gvx; gvy = -gvy; gvo = -gvo; } //yflip if (nwal->cstat&256) { gvx = -gvx; gvy = -gvy; gvo = -gvo; } //yflip
{
float oldfogval;
bglGetFloatv(GL_FOG_DENSITY,&oldfogval);
bglFogf(GL_FOG_DENSITY,gvisibility/(nwal->shade<0?klabs(nwal->shade):1)*((float)((unsigned char)(sec->visibility+16))));
pow2xsplit = 1; domost(x0,ofy0,x1,ofy1); pow2xsplit = 1; domost(x0,ofy0,x1,ofy1);
bglFogf(GL_FOG_DENSITY,oldfogval);
}
if (wal->cstat&(2+8)) { guo = oguo; gux = ogux; guy = oguy; } if (wal->cstat&(2+8)) { guo = oguo; gux = ogux; guy = oguy; }
} }
@ -3109,7 +3125,15 @@ static void polymost_drawalls (long bunch)
guo = gdo*t - guo; guo = gdo*t - guo;
} }
if (wal->cstat&256) { gvx = -gvx; gvy = -gvy; gvo = -gvo; } //yflip if (wal->cstat&256) { gvx = -gvx; gvy = -gvy; gvo = -gvo; } //yflip
{
float oldfogval;
bglGetFloatv(GL_FOG_DENSITY,&oldfogval);
bglFogf(GL_FOG_DENSITY,gvisibility/(wal->shade<0?klabs(wal->shade):1)*((float)((unsigned char)(sec->visibility+16))));
pow2xsplit = 1; domost(x0,-10000,x1,-10000); pow2xsplit = 1; domost(x0,-10000,x1,-10000);
bglFogf(GL_FOG_DENSITY,oldfogval);
}
} }
if (nextsectnum >= 0) if (nextsectnum >= 0)
@ -3667,7 +3691,7 @@ if (tspr->cstat&2) { if (!(tspr->cstat&512)) method = 2+4; else method = 3+4; }
col[2] = (float)palookupfog[sector[tspr->sectnum].floorpal].b / 63.f; col[2] = (float)palookupfog[sector[tspr->sectnum].floorpal].b / 63.f;
col[3] = 0; col[3] = 0;
bglFogfv(GL_FOG_COLOR,col); //default is 0,0,0,0 bglFogfv(GL_FOG_COLOR,col); //default is 0,0,0,0
bglFogf(GL_FOG_DENSITY,(gvisibility/2)/(globalshade<0?klabs(globalshade):1)*((float)((unsigned char)(sector[tspr->sectnum].visibility+16)))); bglFogf(GL_FOG_DENSITY,gvisibility/(globalshade<0?klabs(globalshade):1)*((float)((unsigned char)(sector[tspr->sectnum].visibility+16))));
} }
while (rendmode == 3 && !(spriteext[tspr->owner].flags&SPREXT_NOTMD)) { while (rendmode == 3 && !(spriteext[tspr->owner].flags&SPREXT_NOTMD)) {