mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
@@ -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
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user