mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 03:24:06 +09:00
needs more shader (for smoothing out lightmap render)
This commit is contained in:
@@ -442,12 +442,12 @@ object BlocksDrawer {
|
||||
LightmapRenderer.getHighestRGB(x + 1, y - 1) ?: 0 >= tileDrawLightThreshold ||
|
||||
LightmapRenderer.getHighestRGB(x - 1, y + 1) ?: 0 >= tileDrawLightThreshold)
|
||||
{
|
||||
// TODO coalesce non-lit black patches
|
||||
// FIXME bad scanlines bug
|
||||
if (zeroTileCounter > 0) {
|
||||
batch.color = Color.BLACK
|
||||
/*batch.color = Color.BLACK
|
||||
batch.fillRect(x * TILE_SIZEF, y * TILE_SIZEF, -zeroTileCounter * TILE_SIZEF, TILE_SIZEF)
|
||||
batch.color = color
|
||||
zeroTileCounter = 0
|
||||
zeroTileCounter = 0*/
|
||||
}
|
||||
|
||||
|
||||
@@ -508,6 +508,8 @@ object BlocksDrawer {
|
||||
// draw black patch
|
||||
else {
|
||||
zeroTileCounter += 1 // unused for now
|
||||
batch.color = Color.BLACK
|
||||
batch.fillRect(x * TILE_SIZEF, y * TILE_SIZEF, TILE_SIZEF, TILE_SIZEF)
|
||||
}
|
||||
} // end if (not an air)
|
||||
} catch (e: NullPointerException) {
|
||||
@@ -517,12 +519,13 @@ object BlocksDrawer {
|
||||
|
||||
// hit the end of the current scanline
|
||||
// FIXME bad scanlines bug
|
||||
if (x == for_x_end) {
|
||||
/*if (x == for_x_end) {
|
||||
val x = x + 1 // because current tile is also counted
|
||||
batch.color = Color.BLACK
|
||||
batch.fillRect(x * TILE_SIZEF, y * TILE_SIZEF, -zeroTileCounter * TILE_SIZEF, TILE_SIZEF)
|
||||
batch.color = color
|
||||
zeroTileCounter = 0
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -334,7 +334,7 @@ object LightmapRenderer {
|
||||
while (x < this_x_end) {
|
||||
// smoothing enabled and zoom is 0.75 or greater
|
||||
// (zoom of 0.5 should not smoothed, for performance)
|
||||
if (TerrarumGDX.getConfigBoolean("smoothlighting") &&
|
||||
if (false && //TerrarumGDX.getConfigBoolean("smoothlighting") &&
|
||||
TerrarumGDX.ingame!!.screenZoom >= 0.75) {
|
||||
|
||||
val thisLightLevel = getLightForOpaque(x, y) ?: 0
|
||||
|
||||
Reference in New Issue
Block a user