mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 03:24:06 +09:00
the stars are rendered but still some works left
This commit is contained in:
Binary file not shown.
@@ -67,8 +67,9 @@ internal object WeatherMixer : RNGConsumer {
|
|||||||
var forceSolarElev: Double? = null
|
var forceSolarElev: Double? = null
|
||||||
var forceTurbidity: 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 {
|
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)
|
it.texture.setWrap(Texture.TextureWrap.Repeat, Texture.TextureWrap.Repeat)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,7 +226,6 @@ internal object WeatherMixer : RNGConsumer {
|
|||||||
batch.inUse {
|
batch.inUse {
|
||||||
batch.shader = shaderBlendMax
|
batch.shader = shaderBlendMax
|
||||||
shaderBlendMax.setUniformi("tex1", 1)
|
shaderBlendMax.setUniformi("tex1", 1)
|
||||||
shaderBlendMax.setUniformf("screenSize", App.scr.wf, App.scr.hf)
|
|
||||||
shaderBlendMax.setUniformf("drawOffset", 0f, gradY)
|
shaderBlendMax.setUniformf("drawOffset", 0f, gradY)
|
||||||
shaderBlendMax.setUniformf("drawOffsetSize", App.scr.wf, gH)
|
shaderBlendMax.setUniformf("drawOffsetSize", App.scr.wf, gH)
|
||||||
shaderBlendMax.setUniform2fv("skyboxUV1", uvs, 0, 2)
|
shaderBlendMax.setUniform2fv("skyboxUV1", uvs, 0, 2)
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ out vec4 fragColor;
|
|||||||
|
|
||||||
vec2 boolean = vec2(0.0, 1.0);
|
vec2 boolean = vec2(0.0, 1.0);
|
||||||
|
|
||||||
uniform vec2 screenSize;
|
|
||||||
uniform vec2 drawOffset; // value of the 'gradY'
|
uniform vec2 drawOffset; // value of the 'gradY'
|
||||||
uniform vec2 drawOffsetSize; // value of the 'gradH'
|
uniform vec2 drawOffsetSize; // value of the 'gradH'
|
||||||
uniform vec2 skyboxUV1; // (u, v) for the skybox drawing
|
uniform vec2 skyboxUV1; // (u, v) for the skybox drawing
|
||||||
@@ -28,11 +27,11 @@ void main(void) {
|
|||||||
vec2 astrumTexCoord = (v_texCoords * drawOffsetSize + drawOffset + astrumScroll) / tex1Size;
|
vec2 astrumTexCoord = (v_texCoords * drawOffsetSize + drawOffset + astrumScroll) / tex1Size;
|
||||||
|
|
||||||
|
|
||||||
vec4 colorTex0 = texture(u_texture, skyboxTexCoord); // lightmap (RGB) pre-mixed
|
vec4 colorTex0 = texture(u_texture, skyboxTexCoord);
|
||||||
vec4 colorTex1 = texture(tex1, astrumTexCoord); // lightmap (A) pre-mixed
|
vec4 colorTex1 = texture(tex1, astrumTexCoord);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// fragColor = (max(colorTex0, colorTex1) * boolean.yyyx) + boolean.xxxy;
|
fragColor = (max(colorTex0, colorTex1) * boolean.yyyx) + boolean.xxxy;
|
||||||
fragColor = colorTex0;
|
// fragColor = colorTex1;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user