mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 02:54:04 +09:00
skybox: slightly darker to match 0.3.2 skybox
This commit is contained in:
BIN
assets/clut/skybox.png
LFS
BIN
assets/clut/skybox.png
LFS
Binary file not shown.
BIN
assets/clut/skyboxavr.png
LFS
BIN
assets/clut/skyboxavr.png
LFS
Binary file not shown.
@@ -1,5 +1,6 @@
|
|||||||
package net.torvald.terrarum.clut
|
package net.torvald.terrarum.clut
|
||||||
|
|
||||||
|
import com.badlogic.gdx.graphics.Color
|
||||||
import net.torvald.colourutil.CIEXYZ
|
import net.torvald.colourutil.CIEXYZ
|
||||||
import net.torvald.colourutil.HUSLColorConverter
|
import net.torvald.colourutil.HUSLColorConverter
|
||||||
import net.torvald.colourutil.toColor
|
import net.torvald.colourutil.toColor
|
||||||
@@ -61,7 +62,7 @@ class GenerateSkyboxTextureAtlas {
|
|||||||
ArHosekSkyModel.arhosek_tristim_skymodel_radiance(state, theta, gamma, 2).toFloat()
|
ArHosekSkyModel.arhosek_tristim_skymodel_radiance(state, theta, gamma, 2).toFloat()
|
||||||
)
|
)
|
||||||
val xyz2 = xyz.scaleToFit(elevationDeg)
|
val xyz2 = xyz.scaleToFit(elevationDeg)
|
||||||
val rgb = xyz2.toRGB().toColor()
|
val rgb = xyz2.toRGB().toColor().gamma(1.2f)
|
||||||
val colour = rgb.toIntBits().toLittle()
|
val colour = rgb.toIntBits().toLittle()
|
||||||
|
|
||||||
for (i in 0..3) {
|
for (i in 0..3) {
|
||||||
@@ -70,6 +71,13 @@ class GenerateSkyboxTextureAtlas {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun Color.gamma(gam: Float): Color {
|
||||||
|
this.r = this.r.pow(gam)
|
||||||
|
this.g = this.g.pow(gam)
|
||||||
|
this.b = this.b.pow(gam)
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
// y: increasing turbidity (1.0 .. 10.0, in steps of 0.333)
|
// y: increasing turbidity (1.0 .. 10.0, in steps of 0.333)
|
||||||
// x: elevations (-75 .. 75 in steps of 1, then albedo of [0.1, 0.3, 0.5, 0.7, 0.9])
|
// x: elevations (-75 .. 75 in steps of 1, then albedo of [0.1, 0.3, 0.5, 0.7, 0.9])
|
||||||
val TGA_HEADER_SIZE = 18
|
val TGA_HEADER_SIZE = 18
|
||||||
|
|||||||
Reference in New Issue
Block a user