yet another sky model changes

This commit is contained in:
minjaesong
2023-07-26 00:09:47 +09:00
parent e04d0284bb
commit 5495552db5
2 changed files with 5 additions and 2 deletions

View File

@@ -103,7 +103,9 @@ object Skybox : Disposable {
// printdbg(this, "elev $elevationDeg turb $turbidity")
for (y in 0 until gradSize) {
val theta = (y.toDouble() / gradSize * 1.0).coerceIn(0.0, 1.0).mapCircle() * HALF_PI
var yf = (y.toDouble() / gradSize * 1.0).coerceIn(0.0, 1.0)
if (elevationDeg < 0) yf += (elevationDeg / 90.0)
val theta = yf.mapCircle() * HALF_PI
// vertical angle, where 0 is zenith, ±90 is ground (which is odd)
val xyz = CIEXYZ(