mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 03:54:06 +09:00
corrected lighting bug where illuminant in front of the sun can take over the light level of the sun for a tile the illuminant occupies, ActorWithBody phys WIP
Former-commit-id: a1ce45eded6136464d0a2c02227c61ee8f2adcb2 Former-commit-id: e4af5a44eb79b4db85458c9233e43a6117797331
This commit is contained in:
@@ -229,8 +229,7 @@ object LightmapRenderer {
|
||||
}
|
||||
// luminous tile on top of air
|
||||
else if (thisWall == AIR && thisTileLuminosity.toInt() > 0) {
|
||||
val darkenSunlight = darkenColoured(sunLight, thisTileOpacity)
|
||||
lightLevelThis = maximiseRGB(darkenSunlight, thisTileLuminosity) // maximise to not exceed 1.0 with normal (<= 1.0) light
|
||||
lightLevelThis = maximiseRGB(sunLight, thisTileLuminosity) // maximise to not exceed 1.0 with normal (<= 1.0) light
|
||||
}
|
||||
// opaque wall and luminous tile
|
||||
else if (thisWall != AIR && thisTileLuminosity.toInt() > 0) {
|
||||
|
||||
@@ -13,12 +13,12 @@ import org.newdawn.slick.*
|
||||
object MapDrawer {
|
||||
const val TILE_SIZE = 16
|
||||
|
||||
private var envOverlayColourmap: Image = Image("./res/graphics/black_body_col_1000_40000_K.png")
|
||||
private var envOverlayColourmap: Image = Image("./res/graphics/colourmap/black_body_col_1000_40000_K.png")
|
||||
|
||||
private val ENV_COLTEMP_LOWEST = 5500
|
||||
private val ENV_COLTEMP_HIGHEST = 7500
|
||||
|
||||
val ENV_COLTEMP_NOON = 6500
|
||||
val ENV_COLTEMP_NOON = 6500 // 6500 == sRGB White == untouched!
|
||||
|
||||
private var colTemp: Int = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user