mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +00:00
OpenGL: Fix lower unpegged texture offset, fix lower unpegged + effect 1 so the texture actually skews
This commit is contained in:
parent
d86dc67218
commit
bf85cc25bd
1 changed files with 6 additions and 6 deletions
|
@ -1719,12 +1719,12 @@ static void HWR_StoreWallRange(double startfrac, double endfrac)
|
||||||
if (!(gr_linedef->flags & ML_DONTPEGBOTTOM))
|
if (!(gr_linedef->flags & ML_DONTPEGBOTTOM))
|
||||||
texturevpegbottom = 0;
|
texturevpegbottom = 0;
|
||||||
else if (gr_linedef->flags & ML_EFFECT1)
|
else if (gr_linedef->flags & ML_EFFECT1)
|
||||||
texturevpegbottom = worldtop - worldlow;
|
texturevpegbottom = worldbottom - worldlow;
|
||||||
else
|
else
|
||||||
texturevpegbottom = gr_frontsector->ceilingheight - gr_backsector->floorheight;
|
texturevpegbottom = gr_frontsector->floorheight - gr_backsector->floorheight;
|
||||||
#else
|
#else
|
||||||
if (gr_linedef->flags & ML_DONTPEGBOTTOM)
|
if (gr_linedef->flags & ML_DONTPEGBOTTOM)
|
||||||
texturevpegbottom = worldtop - worldlow;
|
texturevpegbottom = worldbottom - worldlow;
|
||||||
else
|
else
|
||||||
texturevpegbottom = 0;
|
texturevpegbottom = 0;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1752,9 +1752,9 @@ static void HWR_StoreWallRange(double startfrac, double endfrac)
|
||||||
else if (gr_linedef->flags & ML_DONTPEGBOTTOM)
|
else if (gr_linedef->flags & ML_DONTPEGBOTTOM)
|
||||||
{
|
{
|
||||||
// Skewed by bottom
|
// Skewed by bottom
|
||||||
wallVerts[0].t = (texturevpegbottom + worldlow - worldbottom) * grTex->scaleY;
|
wallVerts[0].t = wallVerts[1].t = (texturevpegbottom + worldlow - worldbottom) * grTex->scaleY;
|
||||||
wallVerts[2].t = wallVerts[3].t - (worldlowslope - worldlow) * grTex->scaleY;
|
//wallVerts[3].t = wallVerts[0].t - (worldlow - worldbottom) * grTex->scaleY; // no need, [3] is already this
|
||||||
wallVerts[1].t = wallVerts[2].t - (worldbottomslope - worldlowslope) * grTex->scaleY;
|
wallVerts[2].t = wallVerts[1].t - (worldlowslope - worldbottomslope) * grTex->scaleY;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue