Lightmapper fixes
This commit is contained in:
parent
286de841eb
commit
c59108ece0
3 changed files with 53 additions and 8 deletions
|
|
@ -247,9 +247,9 @@ static int CreateIndexedSectorVerticesLM(FRenderState& renderstate, sector_t* se
|
|||
if (lightmap && lightmap->Type != ST_NONE) // surface may be missing if the subsector is degenerate triangle
|
||||
{
|
||||
FFlatVertex* luvs = &lightmap->Submesh->Mesh.Vertices[lightmap->MeshLocation.StartVertIndex];
|
||||
for (unsigned int j = 0; j < sub->numlines; j++)
|
||||
for (unsigned int j = 0, end = sub->numlines; j < end; j++)
|
||||
{
|
||||
SetFlatVertex(vbo_shadowdata[vi + pos], sub->firstline[j].v1, plane, luvs[j].lu, luvs[j].lv, luvs[j].lindex);
|
||||
SetFlatVertex(vbo_shadowdata[vi + pos], sub->firstline[j].v1, plane, luvs[end - 1 - j].lu, luvs[end - 1 - j].lv, luvs[end - 1 - j].lindex);
|
||||
vbo_shadowdata[vi + pos].z += diff;
|
||||
pos++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue