mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-26 22:31:10 +00:00
Make OpenGL software-like shear effect consistent with software.
This commit is contained in:
parent
f8532d4ad1
commit
699bc2d582
1 changed files with 6 additions and 2 deletions
|
@ -3029,10 +3029,14 @@ EXPORT void HWRAPI(SetTransform) (FTransform *stransform)
|
|||
// https://zdoom.org/wiki/Y-shearing
|
||||
if (shearing)
|
||||
{
|
||||
float fdy = stransform->viewaiming * 2;
|
||||
float shear = stransform->viewaiming * 2;
|
||||
float ang = 2*M_PI*(stransform->rollangle/360);
|
||||
float fdx = stransform->roll ? shear * sin(ang) : 0.0f;
|
||||
float fdy = stransform->roll ? shear * cos(ang) : shear;
|
||||
if (stransform->flip)
|
||||
fdy *= -1.0f;
|
||||
pglTranslatef(0.0f, -fdy/BASEVIDHEIGHT, 0.0f);
|
||||
|
||||
pglTranslatef(fdx/BASEVIDWIDTH, -fdy/BASEVIDHEIGHT, 0.0f);
|
||||
}
|
||||
|
||||
if (special_splitscreen)
|
||||
|
|
Loading…
Reference in a new issue