gl1: Temporary revert back Lightmap size to fix lights

Fix 1ab6214f, 660f5728
This commit is contained in:
Denis Pauk 2023-10-15 16:41:26 +03:00
parent 660f5728c1
commit e17db97176
3 changed files with 5 additions and 5 deletions

View file

@ -261,7 +261,7 @@ LM_BeginBuildingLightmaps(model_t *m)
{ {
static lightstyle_t lightstyles[MAX_LIGHTSTYLES]; static lightstyle_t lightstyles[MAX_LIGHTSTYLES];
int i; int i;
unsigned dummy[128 * 128] = {0}; unsigned dummy[BLOCK_WIDTH * BLOCK_HEIGHT] = {0};
memset(gl_lms.allocated, 0, sizeof(gl_lms.allocated)); memset(gl_lms.allocated, 0, sizeof(gl_lms.allocated));

View file

@ -373,7 +373,7 @@ R_BlendLightmaps(const model_t *currentmodel)
base += (surf->dlight_t * BLOCK_WIDTH + base += (surf->dlight_t * BLOCK_WIDTH +
surf->dlight_s) * LIGHTMAP_BYTES; surf->dlight_s) * LIGHTMAP_BYTES;
RI_BuildLightMap(surf, base, BLOCK_WIDTH * LIGHTMAP_BYTES, R_BuildLightMap(surf, base, BLOCK_WIDTH * LIGHTMAP_BYTES,
&r_newrefdef, r_modulate->value, r_framecount); &r_newrefdef, r_modulate->value, r_framecount);
} }
} }
@ -508,7 +508,7 @@ R_RenderBrushPoly(entity_t *currententity, msurface_t *fa)
smax = (fa->extents[0] >> fa->lmshift) + 1; smax = (fa->extents[0] >> fa->lmshift) + 1;
tmax = (fa->extents[1] >> fa->lmshift) + 1; tmax = (fa->extents[1] >> fa->lmshift) + 1;
RI_BuildLightMap(fa, (void *)temp, smax * 4, R_BuildLightMap(fa, (void *)temp, smax * 4,
&r_newrefdef, r_modulate->value, r_framecount); &r_newrefdef, r_modulate->value, r_framecount);
R_SetCacheState(fa, &r_newrefdef); R_SetCacheState(fa, &r_newrefdef);

View file

@ -274,8 +274,8 @@ typedef struct msurface_s
enum { enum {
// width and height used to be 128, so now we should be able to get the same lightmap data // width and height used to be 128, so now we should be able to get the same lightmap data
// that used 32 lightmaps before into one, so 4 lightmaps should be enough // that used 32 lightmaps before into one, so 4 lightmaps should be enough
BLOCK_WIDTH = 1024, BLOCK_WIDTH = 128,
BLOCK_HEIGHT = 512, BLOCK_HEIGHT = 128,
LIGHTMAP_BYTES = 4, LIGHTMAP_BYTES = 4,
}; };