2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-27 23:25:45 +03:00

CalcSurfaceExtents: MAX_SURFACE_TEXTURE_SIZE limit increased from 256 to 512

This commit is contained in:
s1lentq 2024-09-25 02:02:44 +07:00
parent 7073363c88
commit b29740c19e
2 changed files with 8 additions and 1 deletions

View File

@ -891,7 +891,7 @@ void CalcSurfaceExtents(msurface_t *s)
s->texturemins[i] = bmins[i] * 16;
s->extents[i] = (bmaxs[i] - bmins[i]) * 16;
if (!(tex->flags & TEX_SPECIAL) && s->extents[i] > 256)
if (!(tex->flags & TEX_SPECIAL) && s->extents[i] > MAX_SURFACE_TEXTURE_SIZE)
Sys_Error("%s: Bad surface extents", __func__);
}
}

View File

@ -144,6 +144,13 @@ struct msurface_s
// surface generation data
struct surfcache_s *cachespots[MIPLEVELS];
// Maximum s/t texture size on the surface
#if defined(GLQUAKE) || defined(SWDS)
#define MAX_SURFACE_TEXTURE_SIZE 512
#else
#define MAX_SURFACE_TEXTURE_SIZE 256 // Software rendering is limited to 256
#endif
short texturemins[2]; // smallest s/t position on the surface.
short extents[2]; // ?? s/t texture size, 1..256 for all non-sky surfaces