What if I resurrect the thread and say that the solution was found?
https://github.com/Darkcrafter07/LZDoom ... 3.90.33-XP
https://github.com/Darkcrafter07/LZDoom ... 344074fd84
It works in modern GZDoom too, athough one block is a bit different in hw_walls.cpp:
Code: Select all
in hw_walls.cpp:
void HWWall::Process(HWDrawInfo *di, seg_t *seg, sector_t * frontsector, sector_t * backsector)
{
//
/* mid texture */
sector_t *backsec = isportal? seg->linedef->getPortalDestination()->frontsector : backsector;
bool drawfogboundary = !di->isFullbrightScene() && di->CheckFog(frontsector, backsec);
auto tex = TexMan.GetGameTexture(seg->sidedef->GetTexture(side_t::mid), true);
if (tex != NULL && tex->isValid())
{
if (di->Level->i_compatflags & COMPATF_MASKEDMIDTEX)
{
auto rawtexid = TexMan.GetRawTexture(tex->GetID());
auto rawtex = TexMan.GetGameTexture(rawtexid);
if (rawtex) tex = rawtex;
}
texture = tex;
}
else texture = nullptr;
lightlevel = hw_ClampLight(seg->sidedef->GetLightLevel(foggy, orglightlevel, side_t::mid, false, &rel));
rellight = CalcRelLight(lightlevel, orglightlevel, rel);
if (isportal)
{
lineportal = seg->linedef->getPortal()->mGroup;
// --- Modern GZDoom hardware renderer portal height window cut START ---
// args[1] = Floor Height, args[4] = Ceiling Height from your UDMF configuration
if (seg->linedef->args[1] != 0 || seg->linedef->args[4] != 0)
{
float customFloor = (float)seg->linedef->args[1];
float customCeiling = (float)seg->linedef->args[4];
// Set tight bounds strictly for the hardware portal stencil mask graph pass
ztop[0] = customCeiling;
ztop[1] = customCeiling;
zbottom[0] = customFloor;
zbottom[1] = customFloor;
}
else
{
ztop[0] = bch1;
ztop[1] = bch2;
zbottom[0] = bfh1;
zbottom[1] = bfh2;
}
// Submit the bounded portal task slice into the modern hardware deferred draw command queue
PutPortal(di, PORTALTYPE_LINETOLINE, -1);
// --- Modern GZDoom hardware renderer portal height window cut FINISH ---
}
else
{
if (texture || drawfogboundary)
{
DoMidTexture(di, seg, drawfogboundary, frontsector, backsector, realfront, realback,
fch1, fch2, ffh1, ffh2, bch1, bch2, bfh1, bfh2, zalign);
}
if (backsector->e->XFloor.ffloors.Size() || frontsector->e->XFloor.ffloors.Size())
{
lightlevel = hw_ClampLight(seg->sidedef->GetLightLevel(foggy, orglightlevel, side_t::top, false, &rel));
rellight = CalcRelLight(lightlevel, orglightlevel, rel);
DoFFloorBlocks(di, seg, frontsector, backsector, fch1, fch2, ffh1, ffh2, bch1, bch2, bfh1, bfh2);
}
}
/* bottom texture */
Idk how to implement the visual side for software and polymost renderers yet though...
So here's my "fork" of GZDoom v4.10 ( I like this version the best ) - with the feature implemented, although I didn't make the GitHub repository for it ( do I even need it hehe? ). Only Windows build there ( I'm a PC user you know... ).
Upd.. this one got a bit old because 3D-floors driven cut was added in
https://github.com/Darkcrafter07/LZDoom ... 3.90.35-XP
GZDoom fork also updated - so you guys may perhaps use this code to push in recent UZDoom versions...
Ooops appologies for many edits...