Don't render weather in full map screenshots
This commit is contained in:
@@ -6,20 +6,13 @@ uniform vec2 u_invsize;
|
|||||||
uniform float u_time;
|
uniform float u_time;
|
||||||
uniform float u_dp;
|
uniform float u_dp;
|
||||||
uniform vec2 u_offset;
|
uniform vec2 u_offset;
|
||||||
|
|
||||||
varying vec2 v_texCoords;
|
varying vec2 v_texCoords;
|
||||||
|
|
||||||
float triwave(float y){
|
|
||||||
return abs(2.*fract(y)-1.);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main(){
|
void main(){
|
||||||
vec2 T = v_texCoords.xy;
|
vec2 T = v_texCoords.xy;
|
||||||
vec2 coords = (T * u_texsize) + u_offset;
|
vec2 coords = (T * u_texsize) + u_offset;
|
||||||
|
vec4 color = texture2D(u_texture, T);
|
||||||
vec4 color = texture2D(u_texture, T);
|
|
||||||
|
|
||||||
color.a *= (0.37 + abs(sin(u_time / 15.0)) * .05 + 0.2 * (step(mod(coords.x / u_dp + coords.y / u_dp + u_time / 4.0, 10.0), 3.0)));
|
color.a *= (0.37 + abs(sin(u_time / 15.0)) * .05 + 0.2 * (step(mod(coords.x / u_dp + coords.y / u_dp + u_time / 4.0, 10.0), 3.0)));
|
||||||
|
|
||||||
gl_FragColor = color;
|
gl_FragColor = color;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class Renderer implements ApplicationListener{
|
|||||||
public @Nullable Bloom bloom;
|
public @Nullable Bloom bloom;
|
||||||
public FrameBuffer effectBuffer = new FrameBuffer();
|
public FrameBuffer effectBuffer = new FrameBuffer();
|
||||||
public float laserOpacity = 1f;
|
public float laserOpacity = 1f;
|
||||||
public boolean animateShields;
|
public boolean animateShields, drawWeather = true;
|
||||||
/** minZoom = zooming out, maxZoom = zooming in */
|
/** minZoom = zooming out, maxZoom = zooming in */
|
||||||
public float minZoom = 1.5f, maxZoom = 6f;
|
public float minZoom = 1.5f, maxZoom = 6f;
|
||||||
|
|
||||||
@@ -351,6 +351,7 @@ public class Renderer implements ApplicationListener{
|
|||||||
|
|
||||||
FrameBuffer buffer = new FrameBuffer(w, h);
|
FrameBuffer buffer = new FrameBuffer(w, h);
|
||||||
|
|
||||||
|
drawWeather = false;
|
||||||
float vpW = camera.width, vpH = camera.height, px = camera.position.x, py = camera.position.y;
|
float vpW = camera.width, vpH = camera.height, px = camera.position.x, py = camera.position.y;
|
||||||
disableUI = true;
|
disableUI = true;
|
||||||
camera.width = w;
|
camera.width = w;
|
||||||
@@ -376,6 +377,7 @@ public class Renderer implements ApplicationListener{
|
|||||||
PixmapIO.writePNG(file, fullPixmap);
|
PixmapIO.writePNG(file, fullPixmap);
|
||||||
fullPixmap.dispose();
|
fullPixmap.dispose();
|
||||||
ui.showInfoFade(Core.bundle.format("screenshot", file.toString()));
|
ui.showInfoFade(Core.bundle.format("screenshot", file.toString()));
|
||||||
|
drawWeather = true;
|
||||||
|
|
||||||
buffer.dispose();
|
buffer.dispose();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ public class Weather extends UnlockableContent{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw(){
|
public void draw(){
|
||||||
if(renderer.weatherAlpha() > 0.0001f && Core.settings.getBool("showweather")){
|
if(renderer.weatherAlpha() > 0.0001f && renderer.drawWeather && Core.settings.getBool("showweather")){
|
||||||
Draw.draw(Layer.weather, () -> {
|
Draw.draw(Layer.weather, () -> {
|
||||||
weather.rand.setSeed(0);
|
weather.rand.setSeed(0);
|
||||||
Draw.alpha(renderer.weatherAlpha() * opacity * weather.opacityMultiplier);
|
Draw.alpha(renderer.weatherAlpha() * opacity * weather.opacityMultiplier);
|
||||||
|
|||||||
Reference in New Issue
Block a user