- Add lightmaps to the main shader (currently only OpenGL)

- Create a version of CreateIndexedSectorVertices that works with lightmap sectors
This commit is contained in:
nashmuhandes 2021-09-24 16:56:15 +08:00
commit 2f8cff90b6
12 changed files with 166 additions and 11 deletions

View file

@ -93,10 +93,11 @@ FFlatVertexBuffer::FFlatVertexBuffer(int width, int height, int pipelineNbr):
static const FVertexBufferAttribute format[] = {
{ 0, VATTR_VERTEX, VFmt_Float3, (int)myoffsetof(FFlatVertex, x) },
{ 0, VATTR_TEXCOORD, VFmt_Float2, (int)myoffsetof(FFlatVertex, u) }
{ 0, VATTR_TEXCOORD, VFmt_Float2, (int)myoffsetof(FFlatVertex, u) },
{ 0, VATTR_LIGHTMAP, VFmt_Float3, (int)myoffsetof(FFlatVertex, lu) },
};
mVertexBufferPipeline[n]->SetFormat(1, 2, sizeof(FFlatVertex), format);
mVertexBufferPipeline[n]->SetFormat(1, 3, sizeof(FFlatVertex), format);
}
mVertexBuffer = mVertexBufferPipeline[mPipelinePos];