mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
More fog/visibility tweaking. This makes Polymost's not depend on the screen width.
git-svn-id: https://svn.eduke32.com/eduke32@1944 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
7e9b2eae0f
commit
13dde60ccd
2 changed files with 22 additions and 3 deletions
|
@ -121,8 +121,7 @@ extern double gyxscale, gxyaspect, gviewxrange, ghalfx, grhalfxdown10, grhalfxdo
|
|||
extern double gcosang, gsinang, gcosang2, gsinang2;
|
||||
extern double gchang, gshang, gctang, gstang, gvisibility;
|
||||
|
||||
//#define FOGSCALE 0.0000768
|
||||
#define FOGSCALE ((0.0000768+0.0000128)/(1 + 0.5f*(getrendermode()==4)))
|
||||
#define FOGSCALE 0.0000768
|
||||
|
||||
extern float fogresult, fogcol[4], fogtable[4*MAXPALOOKUPS];
|
||||
|
||||
|
|
|
@ -7755,7 +7755,27 @@ void drawrooms(int32_t daposx, int32_t daposy, int32_t daposz,
|
|||
|
||||
i = mulscale16(xdimenscale,viewingrangerecip);
|
||||
globalpisibility = mulscale16(parallaxvisibility,i);
|
||||
globalvisibility = getrendermode()==0 ? mulscale16(visibility,i) : scale(visibility<<2,4,3);
|
||||
switch (getrendermode())
|
||||
{
|
||||
// switch on renderers to make fog look almost the same everywhere
|
||||
|
||||
case 0:
|
||||
globalvisibility = mulscale16(visibility,i);
|
||||
break;
|
||||
#ifdef USE_OPENGL
|
||||
case 3:
|
||||
// I have no idea what the significance of this constant is,
|
||||
// it was found out experimentally. v v
|
||||
globalvisibility = scale(visibility<<2, xdimen, 1100);
|
||||
break;
|
||||
# ifdef POLYMER
|
||||
case 4:
|
||||
globalvisibility = visibility<<2;
|
||||
break;
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
globalhisibility = mulscale16(globalvisibility,xyaspect);
|
||||
globalcisibility = mulscale8(globalhisibility,320);
|
||||
|
||||
|
|
Loading…
Reference in a new issue