mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Polymost: with r_parallaxskypanning=1, clamp the sky at a constant horizon.
See E4L1 for what this means. git-svn-id: https://svn.eduke32.com/eduke32@2415 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
50375fcff2
commit
cd8836227f
1 changed files with 6 additions and 3 deletions
|
@ -3442,8 +3442,6 @@ static void polymost_drawalls(int32_t bunch)
|
||||||
vv[1] = dd[0]*((double)xdimscale*(double)viewingrange)/(65536.0*65536.0);
|
vv[1] = dd[0]*((double)xdimscale*(double)viewingrange)/(65536.0*65536.0);
|
||||||
vv[0] = dd[0]*((double)((tilesizy[globalpicnum]>>1)+parallaxyoffs)) - vv[1]*ghoriz;
|
vv[0] = dd[0]*((double)((tilesizy[globalpicnum]>>1)+parallaxyoffs)) - vv[1]*ghoriz;
|
||||||
i = (1<<(picsiz[globalpicnum]>>4)); if (i != tilesizy[globalpicnum]) i += i;
|
i = (1<<(picsiz[globalpicnum]>>4)); if (i != tilesizy[globalpicnum]) i += i;
|
||||||
vv[0] += dd[0]*((double)((r_parallaxskypanning)?sec->floorypanning:0))*((double)i)/256.0;
|
|
||||||
|
|
||||||
|
|
||||||
//Hack to draw black rectangle below sky when looking down...
|
//Hack to draw black rectangle below sky when looking down...
|
||||||
gdx = 0; gdy = gxyaspect / 262144.0; gdo = -ghoriz*gdy;
|
gdx = 0; gdy = gxyaspect / 262144.0; gdo = -ghoriz*gdy;
|
||||||
|
@ -3464,6 +3462,8 @@ static void polymost_drawalls(int32_t bunch)
|
||||||
}
|
}
|
||||||
else domost(x0,fy0,x1,fy1);
|
else domost(x0,fy0,x1,fy1);
|
||||||
|
|
||||||
|
if (r_parallaxskypanning)
|
||||||
|
vv[0] += dd[0]*((double)sec->floorypanning)*((double)i)/256.0;
|
||||||
|
|
||||||
gdx = 0; gdy = 0; gdo = dd[0];
|
gdx = 0; gdy = 0; gdo = dd[0];
|
||||||
gux = gdo*(t*((double)xdimscale)*((double)yxaspect)*((double)viewingrange))/(16384.0*65536.0*65536.0*5.0*1024.0);
|
gux = gdo*(t*((double)xdimscale)*((double)yxaspect)*((double)viewingrange))/(16384.0*65536.0*65536.0*5.0*1024.0);
|
||||||
|
@ -3734,13 +3734,13 @@ static void polymost_drawalls(int32_t bunch)
|
||||||
vv[1] = dd[0]*((double)xdimscale*(double)viewingrange)/(65536.0*65536.0);
|
vv[1] = dd[0]*((double)xdimscale*(double)viewingrange)/(65536.0*65536.0);
|
||||||
vv[0] = dd[0]*((double)((tilesizy[globalpicnum]>>1)+parallaxyoffs)) - vv[1]*ghoriz;
|
vv[0] = dd[0]*((double)((tilesizy[globalpicnum]>>1)+parallaxyoffs)) - vv[1]*ghoriz;
|
||||||
i = (1<<(picsiz[globalpicnum]>>4)); if (i != tilesizy[globalpicnum]) i += i;
|
i = (1<<(picsiz[globalpicnum]>>4)); if (i != tilesizy[globalpicnum]) i += i;
|
||||||
vv[0] += dd[0]*((double)((r_parallaxskypanning)?sec->ceilingypanning:0))*((double)i)/256.0;
|
|
||||||
|
|
||||||
//Hack to draw black rectangle below sky when looking down...
|
//Hack to draw black rectangle below sky when looking down...
|
||||||
gdx = 0; gdy = gxyaspect / -262144.0; gdo = -ghoriz*gdy;
|
gdx = 0; gdy = gxyaspect / -262144.0; gdo = -ghoriz*gdy;
|
||||||
gux = 0; guy = 0; guo = 0;
|
gux = 0; guy = 0; guo = 0;
|
||||||
gvx = 0; gvy = 0; gvo = 0;
|
gvx = 0; gvy = 0; gvo = 0;
|
||||||
oy = -vv[0]/vv[1];
|
oy = -vv[0]/vv[1];
|
||||||
|
|
||||||
if ((oy < cy0) && (oy < cy1)) domost(x1,oy,x0,oy);
|
if ((oy < cy0) && (oy < cy1)) domost(x1,oy,x0,oy);
|
||||||
else if ((oy < cy0) != (oy < cy1))
|
else if ((oy < cy0) != (oy < cy1))
|
||||||
{
|
{
|
||||||
|
@ -3756,6 +3756,9 @@ static void polymost_drawalls(int32_t bunch)
|
||||||
}
|
}
|
||||||
else domost(x1,cy1,x0,cy0);
|
else domost(x1,cy1,x0,cy0);
|
||||||
|
|
||||||
|
if (r_parallaxskypanning)
|
||||||
|
vv[0] += dd[0]*((double)sec->ceilingypanning)*((double)i)/256.0;
|
||||||
|
|
||||||
gdx = 0; gdy = 0; gdo = dd[0];
|
gdx = 0; gdy = 0; gdo = dd[0];
|
||||||
gux = gdo*(t*((double)xdimscale)*((double)yxaspect)*((double)viewingrange))/(16384.0*65536.0*65536.0*5.0*1024.0);
|
gux = gdo*(t*((double)xdimscale)*((double)yxaspect)*((double)viewingrange))/(16384.0*65536.0*65536.0*5.0*1024.0);
|
||||||
guy = 0; //guo calculated later
|
guy = 0; //guo calculated later
|
||||||
|
|
Loading…
Reference in a new issue