Add cvar lm_scale for multiplying resolution of the lightmap
This commit is contained in:
parent
1466eeefc0
commit
19e9ac1db3
2 changed files with 5 additions and 1 deletions
|
|
@ -35,6 +35,8 @@ CCMD(invalidatelightmap)
|
|||
Printf("Marked %d out of %d surfaces for update.\n", count, level.levelMesh->Surfaces.Size());
|
||||
}
|
||||
|
||||
EXTERN_CVAR(Float, lm_scale);
|
||||
|
||||
DoomLevelMesh::DoomLevelMesh(FLevelLocals &doomMap)
|
||||
{
|
||||
SunColor = doomMap.SunColor; // TODO keep only one copy?
|
||||
|
|
@ -1100,6 +1102,8 @@ void DoomLevelMesh::BuildSurfaceParams(int lightMapTextureWidth, int lightMapTex
|
|||
surface.sampleDimension = LightmapSampleDistance;
|
||||
}
|
||||
|
||||
surface.sampleDimension = uint16_t(max(int(roundf(float(surface.sampleDimension) / max(1.0f / 4, float(lm_scale)))), 1));
|
||||
|
||||
{
|
||||
// Round to nearest power of two
|
||||
uint32_t n = uint16_t(surface.sampleDimension);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue