mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
fixed a bug where lightmap would flicker when cameraX rolls from small negative number to zero
This commit is contained in:
@@ -206,9 +206,9 @@ object IngameRenderer : Disposable {
|
||||
if (!gamePaused || newWorldLoadedLatch) {
|
||||
measureDebugTime("Renderer.ApparentLightRun") {
|
||||
// recalculate for even frames, or if the sign of the cam-x changed
|
||||
if (App.GLOBAL_RENDER_TIMER % 3 == 0 || WorldCamera.x * oldCamX < 0 || newWorldLoadedLatch)
|
||||
if (App.GLOBAL_RENDER_TIMER % 3 == 0 || WorldCamera.x * oldCamX <= 0 || newWorldLoadedLatch) {
|
||||
LightmapRenderer.fireRecalculateEvent(actorsRenderBehind, actorsRenderFront, actorsRenderMidTop, actorsRenderMiddle, actorsRenderOverlay)
|
||||
|
||||
}
|
||||
oldCamX = WorldCamera.x
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user