mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-08 12:51:51 +09:00
fix: lightmap draw was off by half block
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user