mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-14 20:44:05 +09:00
fixed bad color rendering on blocksdrawer and lightmaprenderer
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user