mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Neat Polymost y-shearing patch from Nuke.YKT
git-svn-id: https://svn.eduke32.com/eduke32@7656 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/build/src/polymost.cpp
This commit is contained in:
parent
9ba2a3b719
commit
5e470e8a5b
1 changed files with 10 additions and 7 deletions
|
@ -1368,7 +1368,7 @@ static void resizeglcheck(void)
|
||||||
m[0][0] = 1.f;
|
m[0][0] = 1.f;
|
||||||
m[1][1] = fxdimen / (fydimen * ratio);
|
m[1][1] = fxdimen / (fydimen * ratio);
|
||||||
m[2][0] = 2.f * ghoriz2 * gstang / fxdimen;
|
m[2][0] = 2.f * ghoriz2 * gstang / fxdimen;
|
||||||
m[2][1] = 2.f * (ghoriz2 * gctang + ghorizcorrect) / fydimen;
|
m[2][1] = 2.f * (ghoriz2 * gctang + ghorizcorrect) / (fydimen * ratio);
|
||||||
m[2][2] = (farclip + nearclip) / (farclip - nearclip);
|
m[2][2] = (farclip + nearclip) / (farclip - nearclip);
|
||||||
m[2][3] = 1.f;
|
m[2][3] = 1.f;
|
||||||
m[3][2] = -(2.f * farclip * nearclip) / (farclip - nearclip);
|
m[3][2] = -(2.f * farclip * nearclip) / (farclip - nearclip);
|
||||||
|
@ -5431,15 +5431,18 @@ void polymost_drawrooms()
|
||||||
//global cos/sin height angle
|
//global cos/sin height angle
|
||||||
if (r_yshearing)
|
if (r_yshearing)
|
||||||
{
|
{
|
||||||
gshang = 0.f;
|
gshang = 0.f;
|
||||||
gchang = 1.f;
|
gchang = 1.f;
|
||||||
ghoriz2 = (float)(ydimen>>1)-ghoriz-ghorizcorrect;
|
ghoriz2 = (float)(ydimen >> 1) - ghoriz - ghorizcorrect;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
float r = (float)(ydimen>>1) - (ghoriz + ghorizcorrect);
|
float r = (float)(ydimen >> 1) - ghoriz - ghorizcorrect;
|
||||||
gshang = r/Bsqrtf(r*r+ghalfx*ghalfx);
|
gshang = r / Bsqrtf(r * r + ghalfx * ghalfx);
|
||||||
gchang = Bsqrtf(1.f-gshang*gshang);
|
gchang = Bsqrtf(1.f - gshang * gshang);
|
||||||
|
ghoriz2 = 0.f;
|
||||||
|
}
|
||||||
|
|
||||||
ghoriz2 = 0.f;
|
ghoriz2 = 0.f;
|
||||||
}
|
}
|
||||||
ghoriz = (float)(ydimen>>1);
|
ghoriz = (float)(ydimen>>1);
|
||||||
|
|
Loading…
Reference in a new issue