NOT using a trick in issue #5 was the key, also closes issue #8

This commit is contained in:
minjaesong
2017-09-13 01:06:01 +09:00
parent 85c5b2868d
commit a048381cce

View File

@@ -197,8 +197,8 @@ class FuckingWorldRenderer(val batch: SpriteBatch) : Screen {
} }
// render? just do it anyway // render? just do it anyway
//LightmapRendererNew.fireRecalculateEvent()
renderScreen() renderScreen()
} }
} }
@@ -221,9 +221,7 @@ class FuckingWorldRenderer(val batch: SpriteBatch) : Screen {
if (TerrarumAppLoader.GLOBAL_RENDER_TIMER % 2 == 1) { LightmapRendererNew.fireRecalculateEvent() // don't half-frame update; it will jitter!
LightmapRendererNew.fireRecalculateEvent()
}
} }
fun renderScreen() { fun renderScreen() {
@@ -318,12 +316,11 @@ class FuckingWorldRenderer(val batch: SpriteBatch) : Screen {
val xrem = -(WorldCamera.x % TILE_SIZEF) val xrem = -(WorldCamera.x % TILE_SIZEF)
val yrem = -(WorldCamera.y % TILE_SIZEF) val yrem = -(WorldCamera.y % TILE_SIZEF)
batch.draw(lightTex, batch.draw(lightTex,
if (xrem == 0f) -TILE_SIZEF else xrem, xrem,
if (yrem == 0f) -TILE_SIZEF else yrem, yrem,
lightTex.width * Ingame.lightmapDownsample, lightTex.height * Ingame.lightmapDownsample lightTex.width * Ingame.lightmapDownsample, lightTex.height * Ingame.lightmapDownsample
//lightTex.width.toFloat(), lightTex.height.toFloat() // for debugging //lightTex.width.toFloat(), lightTex.height.toFloat() // for debugging
) )
// FIXME dae fucking jitter