more sky model changes

This commit is contained in:
minjaesong
2023-07-25 16:53:02 +09:00
parent 4fb30821f1
commit 987ec1fd98
2 changed files with 6 additions and 4 deletions

View File

@@ -270,12 +270,14 @@ internal object WeatherMixer : RNGConsumer {
val pSx: Int; val pSy: Int; val pNx: Int; val pNy: Int
if (timeOfDay < HALF_DAY) {
pSx = pStartRaw; pSy = 0
pSx = pStartRaw.coerceIn(0 until colorMap.width)
pSy = 0
if (pSx == colorMap.width-1) { pNx = pSx; pNy = 1 }
else { pNx = pNextRaw; pNy = 0 }
else { pNx = pSx + 1; pNy = 0 }
}
else {
pSx = pStartRaw; pSy = 1
pSx = (pStartRaw + 1).coerceIn(0 until colorMap.width)
pSy = 1
if (pSx == 0) { pNx = 0; pNy = 0 }
else { pNx = pSx - 1; pNy = 1 }
}