mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-10 18:44:05 +09:00
64 pixels for gradmap instead of 128
This commit is contained in:
@@ -21,7 +21,7 @@ import kotlin.math.*
|
|||||||
*/
|
*/
|
||||||
object Skybox : Disposable {
|
object Skybox : Disposable {
|
||||||
|
|
||||||
const val gradSize = 128
|
const val gradSize = 64
|
||||||
|
|
||||||
private val gradTexBinLowAlbedo: Array<Texture>
|
private val gradTexBinLowAlbedo: Array<Texture>
|
||||||
private val gradTexBinHighAlbedo: Array<Texture>
|
private val gradTexBinHighAlbedo: Array<Texture>
|
||||||
@@ -144,9 +144,9 @@ object Skybox : Disposable {
|
|||||||
// printdbg(this, "elev $elevationDeg turb $turbidity")
|
// printdbg(this, "elev $elevationDeg turb $turbidity")
|
||||||
|
|
||||||
for (yp in 0 until gradSize) {
|
for (yp in 0 until gradSize) {
|
||||||
val yi = yp - 6
|
val yi = yp - 3
|
||||||
val xf = -elevationDeg / 90.0
|
val xf = -elevationDeg / 90.0
|
||||||
var yf = (yi / 116.0).coerceInSmoothly(0.0, 0.95)
|
var yf = (yi / 58.0).coerceInSmoothly(0.0, 0.95)
|
||||||
|
|
||||||
// experiments visualisation: https://www.desmos.com/calculator/5crifaekwa
|
// experiments visualisation: https://www.desmos.com/calculator/5crifaekwa
|
||||||
// if (elevationDeg < 0) yf *= 1.0 - pow(xf, 0.333)
|
// if (elevationDeg < 0) yf *= 1.0 - pow(xf, 0.333)
|
||||||
|
|||||||
Reference in New Issue
Block a user