fix lightmap corruption
This commit is contained in:
parent
45ad261129
commit
2704f442e9
|
@ -7,14 +7,14 @@
|
||||||
- [x] shaders s/map/brush/
|
- [x] shaders s/map/brush/
|
||||||
- [x] pipeline cache
|
- [x] pipeline cache
|
||||||
- [x] swapchain getting stale
|
- [x] swapchain getting stale
|
||||||
- [ ] sprites
|
- [x] HUD sprites
|
||||||
- [x] HUD sprites
|
- [x] issue: lightmap sometimes gets corrupted on map load
|
||||||
|
|
||||||
# Next
|
# Next
|
||||||
- [ ] studio models
|
- [ ] studio models
|
||||||
|
|
||||||
# Planned
|
# Planned
|
||||||
- [ ] issue: lightmap sometimes gets corrupted on map load
|
- [ ] sprites
|
||||||
- [ ] what is GL_Backend*/GL_RenderFrame ???
|
- [ ] what is GL_Backend*/GL_RenderFrame ???
|
||||||
- [ ] beams
|
- [ ] beams
|
||||||
- [ ] particles
|
- [ ] particles
|
||||||
|
|
|
@ -21,6 +21,8 @@ typedef struct
|
||||||
} gllightmapstate_t;
|
} gllightmapstate_t;
|
||||||
|
|
||||||
static gllightmapstate_t gl_lms;
|
static gllightmapstate_t gl_lms;
|
||||||
|
|
||||||
|
// TODO this doesn't really need to be this huge
|
||||||
static uint r_blocklights[BLOCK_SIZE_MAX*BLOCK_SIZE_MAX*3]; // This is just a temp HDR-ish buffer for lightmap generation
|
static uint r_blocklights[BLOCK_SIZE_MAX*BLOCK_SIZE_MAX*3]; // This is just a temp HDR-ish buffer for lightmap generation
|
||||||
|
|
||||||
static void LM_InitBlock( void )
|
static void LM_InitBlock( void )
|
||||||
|
@ -227,6 +229,8 @@ void VK_ClearLightmap( void )
|
||||||
for (int i = 0; i < gl_lms.current_lightmap_texture; ++i)
|
for (int i = 0; i < gl_lms.current_lightmap_texture; ++i)
|
||||||
VK_FreeTexture(tglob.lightmapTextures[i]);
|
VK_FreeTexture(tglob.lightmapTextures[i]);
|
||||||
gl_lms.current_lightmap_texture = 0;
|
gl_lms.current_lightmap_texture = 0;
|
||||||
|
|
||||||
|
LM_InitBlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
void VK_RunLightStyles( void )
|
void VK_RunLightStyles( void )
|
||||||
|
|
Loading…
Reference in New Issue