fix: lightmap draw was off by half block

This commit is contained in:
minjaesong
2024-03-06 02:13:49 +09:00
parent 9a6f45756b
commit 9f399b8722

View File

@@ -582,7 +582,7 @@ object IngameRenderer : Disposable {
batch.shader.setUniformi("u_pattern", 1)
batch.draw(
lightTex,
xrem, yrem,
xrem, yrem - TILE_SIZEF * 0.5f,
lightTex.regionWidth * lightmapDownsample,
lightTex.regionHeight * lightmapDownsample
)
@@ -700,7 +700,7 @@ object IngameRenderer : Disposable {
batch.shader.setUniformi("rnd", rng.nextInt(8192), rng.nextInt(8192))
batch.shader.setUniformi("u_pattern", 1)
batch.draw(lightTex,
xrem, yrem,
xrem, yrem - TILE_SIZEF * 0.5f,
lightTex.regionWidth * lightmapDownsample,
lightTex.regionHeight * lightmapDownsample
)