diff --git a/src/SourceEngine/Main.ts b/src/SourceEngine/Main.ts index 7e978a469..840bec8cc 100644 --- a/src/SourceEngine/Main.ts +++ b/src/SourceEngine/Main.ts @@ -762,8 +762,10 @@ export class BSPRenderer { for (const faceIdx of this.liveFaceSet.values()) { const lightmapUpdater = this.lightmapUpdaters[faceIdx]; - if (lightmapUpdater !== null && lightmapUpdater.checkDirty(renderContext)) + if (lightmapUpdater !== null) { + lightmapUpdater.update(renderContext); lightmapUpdater.buildLightmap(renderContext, this.startLightmapPageIndex); + } const faceInfo = this.bsp.faceInfos[faceIdx]; if (faceInfo.surfaceIndex >= 0) @@ -798,8 +800,10 @@ export class BSPRenderer { const faceIdx = surface.surface.faceList[k]; const lightmapUpdater = this.lightmapUpdaters[faceIdx]; - if (lightmapUpdater !== null && lightmapUpdater.checkDirty(renderContext)) + if (lightmapUpdater !== null) { + lightmapUpdater.update(renderContext); lightmapUpdater.buildLightmap(renderContext, this.startLightmapPageIndex); + } } } diff --git a/src/SourceEngine/Materials/Lightmap.ts b/src/SourceEngine/Materials/Lightmap.ts index 2cc61a9c3..368451dc8 100644 --- a/src/SourceEngine/Materials/Lightmap.ts +++ b/src/SourceEngine/Materials/Lightmap.ts @@ -212,11 +212,16 @@ function lightmapPackRuntimeBumpmap(dstPage: LightmapPage, location: Readonly