diff --git a/assets/mods/basegame/weathers/astrum.png b/assets/mods/basegame/weathers/astrum.png index 79991daaf..d06835a49 100644 --- a/assets/mods/basegame/weathers/astrum.png +++ b/assets/mods/basegame/weathers/astrum.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9ec7eb2877ef63102abea1d056251a1506c6de31a8ca3f608dc4871005aa4831 -size 1361225 +oid sha256:94ba2f07655f4e9567b7af7ef8dc44c480a16e1191807c8415359508884a55e7 +size 1933801 diff --git a/src/net/torvald/terrarum/weather/WeatherMixer.kt b/src/net/torvald/terrarum/weather/WeatherMixer.kt index 1b8e3f735..a25637c55 100644 --- a/src/net/torvald/terrarum/weather/WeatherMixer.kt +++ b/src/net/torvald/terrarum/weather/WeatherMixer.kt @@ -67,8 +67,9 @@ internal object WeatherMixer : RNGConsumer { var forceSolarElev: Double? = null var forceTurbidity: Double? = null + // doesn't work if the png is in greyscale/indexed mode val starmapTex: TextureRegion = TextureRegion(Texture(ModMgr.getGdxFile("basegame", "weathers/astrum.png"))).also { -// it.texture.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear) + it.texture.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear) it.texture.setWrap(Texture.TextureWrap.Repeat, Texture.TextureWrap.Repeat) } @@ -225,7 +226,6 @@ internal object WeatherMixer : RNGConsumer { batch.inUse { batch.shader = shaderBlendMax shaderBlendMax.setUniformi("tex1", 1) - shaderBlendMax.setUniformf("screenSize", App.scr.wf, App.scr.hf) shaderBlendMax.setUniformf("drawOffset", 0f, gradY) shaderBlendMax.setUniformf("drawOffsetSize", App.scr.wf, gH) shaderBlendMax.setUniform2fv("skyboxUV1", uvs, 0, 2) diff --git a/src/shaders/blendSkyboxStars.frag b/src/shaders/blendSkyboxStars.frag index 917754672..2fafbf84a 100644 --- a/src/shaders/blendSkyboxStars.frag +++ b/src/shaders/blendSkyboxStars.frag @@ -13,7 +13,6 @@ out vec4 fragColor; vec2 boolean = vec2(0.0, 1.0); -uniform vec2 screenSize; uniform vec2 drawOffset; // value of the 'gradY' uniform vec2 drawOffsetSize; // value of the 'gradH' uniform vec2 skyboxUV1; // (u, v) for the skybox drawing @@ -28,11 +27,11 @@ void main(void) { vec2 astrumTexCoord = (v_texCoords * drawOffsetSize + drawOffset + astrumScroll) / tex1Size; - vec4 colorTex0 = texture(u_texture, skyboxTexCoord); // lightmap (RGB) pre-mixed - vec4 colorTex1 = texture(tex1, astrumTexCoord); // lightmap (A) pre-mixed + vec4 colorTex0 = texture(u_texture, skyboxTexCoord); + vec4 colorTex1 = texture(tex1, astrumTexCoord); -// fragColor = (max(colorTex0, colorTex1) * boolean.yyyx) + boolean.xxxy; - fragColor = colorTex0; + fragColor = (max(colorTex0, colorTex1) * boolean.yyyx) + boolean.xxxy; +// fragColor = colorTex1; } \ No newline at end of file