fixed bad color rendering on blocksdrawer and lightmaprenderer

This commit is contained in:
minjaesong
2017-07-02 21:53:50 +09:00
parent bea125b66d
commit bbc68110d9
15 changed files with 61 additions and 66 deletions

View File

@@ -320,6 +320,8 @@ object LightmapRenderer {
val this_y_end = for_y_end// + overscan_open
val originalColour = batch.color.cpy()
// draw to the
try {
// loop for "scanlines"
@@ -329,7 +331,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") ?: false &&
if (TerrarumGDX.getConfigBoolean("smoothlighting") &&
TerrarumGDX.ingame!!.screenZoom >= 0.75) {
val thisLightLevel = getLightForOpaque(x, y) ?: 0
@@ -435,6 +437,8 @@ object LightmapRenderer {
}
batch.color = originalColour
}
val lightScalingMagic = 8f