Restored effect of negative horizontal texture scale in software renderer

This commit is contained in:
alexey.lysiuk 2017-02-14 12:33:27 +02:00
parent 73ed351144
commit 08bf08f297
1 changed files with 4 additions and 4 deletions

View File

@ -2046,11 +2046,11 @@ void PrepWall(float *vstep, fixed_t *upos, double walxrepeat, int x1, int x2)
float invZ = WallT.InvZorg + WallT.InvZstep * (float)(x1 + 0.5 - CenterX);
float uGradient = WallT.UoverZstep;
float zGradient = WallT.InvZstep;
float xrepeat = (float)walxrepeat;
float xrepeat = (float)fabs(walxrepeat);
float depthScale = (float)(WallT.InvZstep * WallTMapScale2);
float depthOrg = (float)(-WallT.UoverZstep * WallTMapScale2);
if (xrepeat < 0.0f)
if (walxrepeat < 0.0)
{
for (int x = x1; x < x2; x++)
{
@ -2084,9 +2084,9 @@ void PrepLWall(fixed_t *upos, double walxrepeat, int x1, int x2)
float invZ = WallT.InvZorg + WallT.InvZstep * (float)(x1 + 0.5 - CenterX);
float uGradient = WallT.UoverZstep;
float zGradient = WallT.InvZstep;
float xrepeat = (float)walxrepeat;
float xrepeat = (float)fabs(walxrepeat);
if (xrepeat < 0.0f)
if (walxrepeat < 0.0f)
{
for (int x = x1; x < x2; x++)
{