mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-28 14:31:15 +00:00
Changes:
- OpenGL: Fix a possibly incorrect use of HWR_SplitWall on extra textures on 3D floor sides - OpenGL: Fix a missing use of PF_Decal on extra textures on 3D floor sides
This commit is contained in:
parent
902c61a32f
commit
b888832114
1 changed files with 23 additions and 20 deletions
|
@ -1761,20 +1761,29 @@ static void HWR_RenderExtraTexture(unsigned which, side_t *side, sector_t *sec_f
|
||||||
wallVerts[2].y = FIXED_TO_FLOAT(hS);
|
wallVerts[2].y = FIXED_TO_FLOAT(hS);
|
||||||
wallVerts[1].y = FIXED_TO_FLOAT(lS);
|
wallVerts[1].y = FIXED_TO_FLOAT(lS);
|
||||||
|
|
||||||
|
blendmode |= PF_Decal;
|
||||||
|
|
||||||
extracolormap_t *colormap = gl_frontsector->extra_colormap;
|
extracolormap_t *colormap = gl_frontsector->extra_colormap;
|
||||||
|
|
||||||
|
#define RENDER_WALL_POLYGON() { \
|
||||||
|
if (gl_frontsector->numlights) \
|
||||||
|
{ \
|
||||||
|
if (!(blendmode & PF_Masked)) \
|
||||||
|
HWR_SplitWall(gl_frontsector, wallVerts, texnum, &Surf, FOF_TRANSLUCENT, pfloor, blendmode); \
|
||||||
|
else \
|
||||||
|
HWR_SplitWall(gl_frontsector, wallVerts, texnum, &Surf, FOF_CUTLEVEL, pfloor, blendmode); \
|
||||||
|
} \
|
||||||
|
else \
|
||||||
|
{ \
|
||||||
|
if (!(blendmode & PF_Masked)) \
|
||||||
|
HWR_AddTransparentWall(wallVerts, &Surf, texnum, blendmode, blendmode & PF_Fog, lightnum, colormap); \
|
||||||
|
else \
|
||||||
|
HWR_ProjectWall(wallVerts, &Surf, blendmode, lightnum, colormap); \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
|
||||||
if (!(h == l && hS == lS))
|
if (!(h == l && hS == lS))
|
||||||
{
|
RENDER_WALL_POLYGON();
|
||||||
if (gl_frontsector->numlights)
|
|
||||||
HWR_SplitWall(gl_frontsector, wallVerts, texnum, &Surf, FOF_CUTLEVEL, pfloor, blendmode);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (blendmode != PF_Masked)
|
|
||||||
HWR_AddTransparentWall(wallVerts, &Surf, texnum, blendmode, blendmode & PF_Fog, lightnum, colormap);
|
|
||||||
else
|
|
||||||
HWR_ProjectWall(wallVerts, &Surf, blendmode, lightnum, colormap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!intersected)
|
if (!intersected)
|
||||||
return;
|
return;
|
||||||
|
@ -1850,15 +1859,9 @@ static void HWR_RenderExtraTexture(unsigned which, side_t *side, sector_t *sec_f
|
||||||
wallVerts[1].t = (hS - lS + texturevpegslope) * yscale * grTex->scaleY;
|
wallVerts[1].t = (hS - lS + texturevpegslope) * yscale * grTex->scaleY;
|
||||||
wallVerts[2].s = wallVerts[1].s = ((xcliphigh * xscale) + overlay->offsetx) * grTex->scaleX;
|
wallVerts[2].s = wallVerts[1].s = ((xcliphigh * xscale) + overlay->offsetx) * grTex->scaleX;
|
||||||
|
|
||||||
if (gl_frontsector->numlights)
|
RENDER_WALL_POLYGON();
|
||||||
HWR_SplitWall(gl_frontsector, wallVerts, texnum, &Surf, FOF_CUTLEVEL, pfloor, blendmode);
|
|
||||||
else
|
#undef RENDER_WALL_POLYGON
|
||||||
{
|
|
||||||
if (blendmode != PF_Masked)
|
|
||||||
HWR_AddTransparentWall(wallVerts, &Surf, texnum, blendmode, blendmode & PF_Fog, lightnum, colormap);
|
|
||||||
else
|
|
||||||
HWR_ProjectWall(wallVerts, &Surf, blendmode, lightnum, colormap);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void HWR_RenderFFloorExtraTextures(ffloor_t *pfloor, v2d_t vs, v2d_t ve, float xcliplow, float xcliphigh, FSurfaceInfo Surf, FBITFIELD blendmode, UINT32 lightnum)
|
static void HWR_RenderFFloorExtraTextures(ffloor_t *pfloor, v2d_t vs, v2d_t ve, float xcliplow, float xcliphigh, FSurfaceInfo Surf, FBITFIELD blendmode, UINT32 lightnum)
|
||||||
|
|
Loading…
Reference in a new issue