lightmap downsample works, sampling bug fixed with Filter.NEAREST, now having shrinkage issue

This commit is contained in:
minjaesong
2017-07-12 14:33:59 +09:00
parent 448c5f0fca
commit ed5997d5b4
5 changed files with 34 additions and 22 deletions

View File

@@ -381,11 +381,12 @@ object LightmapRenderer {
batch.color = (getLightForOpaque(x, y) ?: Color(0f,0f,0f,0f)).normaliseToAlphaHDR()
}
batch.fillRect(
(x * DRAW_TILE_SIZE).round().toFloat(),
(y * DRAW_TILE_SIZE).round().toFloat(),
DRAW_TILE_SIZE.ceil() * sameLevelCounter + 1f,
DRAW_TILE_SIZE.ceil() + 1f
x * DRAW_TILE_SIZE,
y * DRAW_TILE_SIZE,
(DRAW_TILE_SIZE * sameLevelCounter).ceil().toFloat(),// + 1f,
DRAW_TILE_SIZE.ceil().toFloat()// + 1f
)
x += sameLevelCounter - 1