Move lightmap atlas textures and light probes to the bindless textures array as its impossible to predict up front how many we need

This commit is contained in:
Magnus Norddahl 2025-07-08 02:59:10 +02:00
commit af6ec929cc
19 changed files with 317 additions and 249 deletions

View file

@ -205,18 +205,6 @@ static void SetFlatVertex(FFlatVertex& ffv, vertex_t* vt, const secplane_t& plan
ffv.lindex = -1.0f;
}
static void SetFlatVertex(FFlatVertex& ffv, vertex_t* vt, const secplane_t& plane, float llu, float llv, float llindex)
{
ffv.x = (float)vt->fX();
ffv.y = (float)vt->fY();
ffv.z = (float)plane.ZatPoint(vt);
ffv.u = (float)vt->fX() / 64.f;
ffv.v = -(float)vt->fY() / 64.f;
ffv.lu = llu;
ffv.lv = llv;
ffv.lindex = llindex;
}
//==========================================================================
//
// Creates the vertices for one plane in one subsector w/lightmap support.
@ -470,6 +458,10 @@ static void UpdatePlaneLightmap(FRenderState& renderstate, sector_t* sec, int pl
vt->lv = luv.Y;
vt->lindex = lindex;
}
else
{
vt->lindex = -1;
}
}
}
renderstate.UpdateShadowData(startvt, &sector_vertices[startvt], countvt);