🔥🔥🔥
@@ -146,7 +146,7 @@ public class AndroidLauncher extends AndroidApplication{
|
||||
}, new AndroidApplicationConfiguration(){{
|
||||
useImmersiveMode = true;
|
||||
hideStatusBar = true;
|
||||
useGL30 = true;
|
||||
//useGL30 = true;
|
||||
errorHandler = CrashSender::log;
|
||||
stencil = 8;
|
||||
}});
|
||||
|
||||
@@ -1,17 +1,9 @@
|
||||
#ifdef GL_ES
|
||||
#define LOWP lowp
|
||||
#define MED mediump
|
||||
precision lowp float;
|
||||
#else
|
||||
#define LOWP
|
||||
#define MED
|
||||
#endif
|
||||
uniform sampler2D u_texture0;
|
||||
uniform sampler2D u_texture1;
|
||||
uniform float BloomIntensity;
|
||||
uniform float OriginalIntensity;
|
||||
uniform lowp sampler2D u_texture0;
|
||||
uniform lowp sampler2D u_texture1;
|
||||
uniform lowp float BloomIntensity;
|
||||
uniform lowp float OriginalIntensity;
|
||||
|
||||
varying MED vec2 v_texCoords;
|
||||
varying vec2 v_texCoords;
|
||||
|
||||
void main(){
|
||||
vec4 original = texture2D(u_texture0, v_texCoords) * OriginalIntensity;
|
||||
|
||||
@@ -1,21 +1,14 @@
|
||||
#ifdef GL_ES
|
||||
#define LOWP lowp
|
||||
#define MED mediump
|
||||
precision lowp float;
|
||||
#else
|
||||
#define LOWP
|
||||
#define MED
|
||||
#endif
|
||||
|
||||
uniform sampler2D u_texture;
|
||||
varying MED vec2 v_texCoords0;
|
||||
varying MED vec2 v_texCoords1;
|
||||
varying MED vec2 v_texCoords2;
|
||||
varying MED vec2 v_texCoords3;
|
||||
varying MED vec2 v_texCoords4;
|
||||
uniform lowp sampler2D u_texture;
|
||||
varying vec2 v_texCoords0;
|
||||
varying vec2 v_texCoords1;
|
||||
varying vec2 v_texCoords2;
|
||||
varying vec2 v_texCoords3;
|
||||
varying vec2 v_texCoords4;
|
||||
const float center = 0.2270270270;
|
||||
const float close = 0.3162162162;
|
||||
const float far = 0.0702702703;
|
||||
|
||||
void main(){
|
||||
gl_FragColor = far * texture2D(u_texture, v_texCoords0)
|
||||
+ close * texture2D(u_texture, v_texCoords1)
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
#ifdef GL_ES
|
||||
#define LOWP lowp
|
||||
#define MED mediump
|
||||
precision lowp float;
|
||||
#else
|
||||
#define LOWP
|
||||
#define MED
|
||||
#endif
|
||||
uniform sampler2D u_texture0;
|
||||
uniform vec2 threshold;
|
||||
varying MED vec2 v_texCoords;
|
||||
|
||||
uniform lowp sampler2D u_texture0;
|
||||
uniform lowp vec2 threshold;
|
||||
varying vec2 v_texCoords;
|
||||
|
||||
void main(){
|
||||
vec4 color = texture2D(u_texture0, v_texCoords);
|
||||
if(color.r + color.g + color.b > 0.5 * 3.0){
|
||||
|
||||
@@ -1,17 +1,9 @@
|
||||
#ifdef GL_ES
|
||||
#define LOWP lowp
|
||||
#define MED mediump
|
||||
precision lowp float;
|
||||
#else
|
||||
#define LOWP
|
||||
#define MED
|
||||
#endif
|
||||
uniform sampler2D u_texture0;
|
||||
uniform sampler2D u_texture1;
|
||||
uniform float BloomIntensity;
|
||||
uniform float OriginalIntensity;
|
||||
uniform lowp sampler2D u_texture0;
|
||||
uniform lowp sampler2D u_texture1;
|
||||
uniform lowp float BloomIntensity;
|
||||
uniform lowp float OriginalIntensity;
|
||||
|
||||
varying MED vec2 v_texCoords;
|
||||
varying vec2 v_texCoords;
|
||||
|
||||
void main(){
|
||||
vec4 original = texture2D(u_texture0, v_texCoords) * OriginalIntensity;
|
||||
|
||||
@@ -1,18 +1,13 @@
|
||||
#ifdef GL_ES
|
||||
#define MED mediump
|
||||
#else
|
||||
#define MED
|
||||
#endif
|
||||
|
||||
attribute vec4 a_position;
|
||||
attribute vec4 a_position;
|
||||
attribute vec2 a_texCoord0;
|
||||
uniform vec2 dir;
|
||||
uniform vec2 size;
|
||||
varying MED vec2 v_texCoords0;
|
||||
varying MED vec2 v_texCoords1;
|
||||
varying MED vec2 v_texCoords2;
|
||||
varying MED vec2 v_texCoords3;
|
||||
varying MED vec2 v_texCoords4;
|
||||
varying vec2 v_texCoords0;
|
||||
varying vec2 v_texCoords1;
|
||||
varying vec2 v_texCoords2;
|
||||
varying vec2 v_texCoords3;
|
||||
varying vec2 v_texCoords4;
|
||||
const vec2 futher = vec2(3.2307692308, 3.2307692308);
|
||||
const vec2 closer = vec2(1.3846153846, 1.3846153846);
|
||||
|
||||
|
||||
@@ -1,21 +1,14 @@
|
||||
#ifdef GL_ES
|
||||
#define LOWP lowp
|
||||
#define MED mediump
|
||||
precision lowp float;
|
||||
#else
|
||||
#define LOWP
|
||||
#define MED
|
||||
#endif
|
||||
|
||||
uniform sampler2D u_texture;
|
||||
varying MED vec2 v_texCoords0;
|
||||
varying MED vec2 v_texCoords1;
|
||||
varying MED vec2 v_texCoords2;
|
||||
varying MED vec2 v_texCoords3;
|
||||
varying MED vec2 v_texCoords4;
|
||||
uniform lowp sampler2D u_texture;
|
||||
varying vec2 v_texCoords0;
|
||||
varying vec2 v_texCoords1;
|
||||
varying vec2 v_texCoords2;
|
||||
varying vec2 v_texCoords3;
|
||||
varying vec2 v_texCoords4;
|
||||
const float center = 0.2270270270;
|
||||
const float close = 0.3162162162;
|
||||
const float far = 0.0702702703;
|
||||
|
||||
void main(){
|
||||
gl_FragColor.rgb = far * texture2D(u_texture, v_texCoords0).rgb
|
||||
+ close * texture2D(u_texture, v_texCoords1).rgb
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
#ifdef GL_ES
|
||||
#define LOWP lowp
|
||||
#define MED mediump
|
||||
precision lowp float;
|
||||
#else
|
||||
#define LOWP
|
||||
#define MED
|
||||
#endif
|
||||
uniform sampler2D u_texture0;
|
||||
uniform vec2 threshold;
|
||||
varying MED vec2 v_texCoords;
|
||||
uniform lowp sampler2D u_texture0;
|
||||
uniform lowp vec2 threshold;
|
||||
varying vec2 v_texCoords;
|
||||
|
||||
void main(){
|
||||
vec4 tex = texture2D(u_texture0, v_texCoords);
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
#ifdef GL_ES
|
||||
#define MED mediump
|
||||
#else
|
||||
#define MED
|
||||
#endif
|
||||
attribute vec4 a_position;
|
||||
attribute vec4 a_position;
|
||||
attribute vec2 a_texCoord0;
|
||||
varying MED vec2 v_texCoords;
|
||||
varying vec2 v_texCoords;
|
||||
|
||||
void main(){
|
||||
v_texCoords = a_texCoord0;
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
#ifdef GL_ES
|
||||
#define LOWP lowp
|
||||
#define MED mediump
|
||||
precision lowp float;
|
||||
#else
|
||||
#define LOWP
|
||||
#define MED
|
||||
#endif
|
||||
uniform sampler2D u_texture0;
|
||||
uniform vec2 threshold;
|
||||
varying MED vec2 v_texCoords;
|
||||
uniform lowp sampler2D u_texture0;
|
||||
uniform lowp vec2 threshold;
|
||||
varying mediump vec2 v_texCoords;
|
||||
|
||||
void main(){
|
||||
gl_FragColor.rgb = (texture2D(u_texture0, v_texCoords).rgb - vec3(threshold.x)) * threshold.y;
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
const float PI = 3.14159265359;
|
||||
const float MAX = 10000.0;
|
||||
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
uniform sampler2D u_texture;
|
||||
|
||||
uniform vec4 u_color;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
varying vec3 v_texCoords;
|
||||
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
uniform sampler2D u_texture;
|
||||
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
uniform sampler2D u_texture;
|
||||
uniform vec4 u_ambient;
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
varying vec4 v_col;
|
||||
|
||||
void main(){
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
varying vec4 v_col;
|
||||
varying vec4 v_position;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
uniform sampler2D u_texture;
|
||||
|
||||
varying vec2 v_texCoord;
|
||||
|
||||
void main(){
|
||||
gl_FragColor = texture2D(u_texture, v_texCoord);
|
||||
}
|
||||
@@ -1,8 +1,3 @@
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
precision highp int;
|
||||
#endif
|
||||
|
||||
#define MAX_HITS 64
|
||||
#define HIT_RADIUS 12.0
|
||||
#define ALPHA 0.18
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
//shades of slag
|
||||
#define S2 vec3(100.0, 93.0, 49.0) / 100.0
|
||||
#define S1 vec3(100.0, 60.0, 25.0) / 100.0
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
#define NSCALE 180.0 / 2.0
|
||||
|
||||
uniform sampler2D u_texture;
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
#define step 3.0
|
||||
|
||||
uniform sampler2D u_texture;
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
uniform sampler2D u_texture;
|
||||
|
||||
uniform vec2 u_campos;
|
||||
|
||||
|
Before Width: | Height: | Size: 769 B After Width: | Height: | Size: 757 B |
|
Before Width: | Height: | Size: 674 KiB After Width: | Height: | Size: 836 KiB |
|
Before Width: | Height: | Size: 204 KiB After Width: | Height: | Size: 124 KiB |
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 301 KiB |
|
Before Width: | Height: | Size: 301 KiB After Width: | Height: | Size: 279 KiB |
|
Before Width: | Height: | Size: 295 KiB After Width: | Height: | Size: 915 KiB |
|
Before Width: | Height: | Size: 939 KiB |
@@ -20,8 +20,6 @@ import mindustry.mod.*;
|
||||
import mindustry.net.Net;
|
||||
import mindustry.ui.*;
|
||||
|
||||
import java.nio.*;
|
||||
|
||||
import static arc.Core.*;
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
@@ -35,6 +33,8 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform
|
||||
|
||||
@Override
|
||||
public void setup(){
|
||||
//array textures are gl30 only
|
||||
if(gl30 == null) useArrayTextures = false;
|
||||
|
||||
loader = new LoadRenderer();
|
||||
Events.fire(new ClientCreateEvent());
|
||||
@@ -48,7 +48,9 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform
|
||||
return (Float.isNaN(result) || Float.isInfinite(result)) ? 1f : Mathf.clamp(result, 0.0001f, 60f / 10f);
|
||||
});
|
||||
|
||||
batch = new SortedSpriteBatch();
|
||||
batch = new SortedSpriteDelegate(Vars.useArrayTextures ?
|
||||
new ArrayTextureSpriteBatch() :
|
||||
new SpriteBatch());
|
||||
assets = new AssetManager();
|
||||
assets.setLoader(Texture.class, "." + mapExtension, new MapPreviewLoader());
|
||||
|
||||
@@ -70,7 +72,9 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform
|
||||
|
||||
assets.load(new AssetDescriptor<>("sprites/sprites.atlas", TextureAtlas.class)).loaded = t -> {
|
||||
atlas = (TextureAtlas)t;
|
||||
Fonts.mergeFontAtlas(atlas);
|
||||
if(!useArrayTextures){
|
||||
Fonts.mergeFontAtlas(atlas);
|
||||
}
|
||||
};
|
||||
|
||||
assets.loadRun("maps", Map.class, () -> maps.loadPreviews());
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package mindustry;
|
||||
|
||||
import arc.Application.*;
|
||||
import arc.*;
|
||||
import arc.assets.*;
|
||||
import arc.files.*;
|
||||
@@ -39,6 +38,8 @@ public class Vars implements Loadable{
|
||||
public static boolean loadedLogger = false, loadedFileLogger = false;
|
||||
/** Maximum schematic size.*/
|
||||
public static final int maxSchematicSize = 32;
|
||||
/** Whether to use array texture batches. */
|
||||
public static boolean useArrayTextures = true;
|
||||
/** All schematic base64 starts with this string.*/
|
||||
public static final String schematicBaseStart ="bXNjaAB";
|
||||
/** IO buffer size. */
|
||||
|
||||
@@ -278,7 +278,7 @@ public class Control implements ApplicationListener, Loadable{
|
||||
}catch(SaveException e){
|
||||
Log.err(e);
|
||||
sector.save = null;
|
||||
ui.showErrorMessage("$save.corrupted");
|
||||
Time.runTask(10f, () -> ui.showErrorMessage("$save.corrupted"));
|
||||
slot.delete();
|
||||
playSector(sector);
|
||||
}
|
||||
|
||||
@@ -391,7 +391,7 @@ public class MapGenerateDialog extends BaseDialog{
|
||||
if(pixmap == null || texture == null){
|
||||
return;
|
||||
}
|
||||
texture.draw(pixmap, 0, 0);
|
||||
texture.draw(pixmap);
|
||||
generating = false;
|
||||
});
|
||||
}catch(Exception e){
|
||||
|
||||
@@ -27,14 +27,7 @@ public class IndexedRenderer implements Disposable{
|
||||
" gl_Position = u_projTrans * " + Shader.positionAttribute + ";",
|
||||
"}"),
|
||||
Strings.join("\n",
|
||||
"#ifdef GL_ES",
|
||||
"#define LOWP lowp",
|
||||
"precision mediump float;",
|
||||
"#else",
|
||||
"#define LOWP ",
|
||||
"#endif",
|
||||
"",
|
||||
"varying LOWP vec4 v_color;",
|
||||
"varying lowp vec4 v_color;",
|
||||
"varying vec2 v_texCoords;",
|
||||
"uniform sampler2D u_texture;",
|
||||
"",
|
||||
|
||||
@@ -129,7 +129,7 @@ public class MinimapRenderer implements Disposable{
|
||||
for(Tile tile : world.tiles){
|
||||
pixmap.draw(tile.x, pixmap.getHeight() - 1 - tile.y, colorFor(tile));
|
||||
}
|
||||
texture.draw(pixmap, 0, 0);
|
||||
texture.draw(pixmap);
|
||||
}
|
||||
|
||||
public void update(Tile tile){
|
||||
|
||||
@@ -10,6 +10,7 @@ import arc.math.geom.*;
|
||||
import arc.scene.ui.layout.*;
|
||||
import arc.util.ArcAnnotate.*;
|
||||
import arc.util.*;
|
||||
import mindustry.*;
|
||||
import mindustry.type.*;
|
||||
|
||||
import static mindustry.Vars.renderer;
|
||||
@@ -26,6 +27,7 @@ public class Shaders{
|
||||
public static AtmosphereShader atmosphere;
|
||||
public static MeshShader mesh = new MeshShader();
|
||||
public static Shader unlit;
|
||||
public static Shader screenspace;
|
||||
|
||||
public static void init(){
|
||||
blockbuild = new BlockBuild();
|
||||
@@ -46,6 +48,7 @@ public class Shaders{
|
||||
planetGrid = new PlanetGridShader();
|
||||
atmosphere = new AtmosphereShader();
|
||||
unlit = new LoadShader("planet", "unlit");
|
||||
screenspace = new LoadShader("screenspace", "screenspace");
|
||||
}
|
||||
|
||||
public static class AtmosphereShader extends LoadShader{
|
||||
@@ -131,7 +134,7 @@ public class Shaders{
|
||||
|
||||
public static class FogShader extends LoadShader{
|
||||
public FogShader(){
|
||||
super("fog", "default");
|
||||
super("fog", "default", true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,7 +144,7 @@ public class Shaders{
|
||||
public TextureRegion region;
|
||||
|
||||
public UnitBuild(){
|
||||
super("unitbuild", "default");
|
||||
super("unitbuild", "default", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -161,7 +164,7 @@ public class Shaders{
|
||||
public TextureRegion region = new TextureRegion();
|
||||
|
||||
public BlockBuild(){
|
||||
super("blockbuild", "default");
|
||||
super("blockbuild", "default", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -222,8 +225,20 @@ public class Shaders{
|
||||
}
|
||||
|
||||
public static class LoadShader extends Shader{
|
||||
|
||||
public LoadShader(String frag, String vert){
|
||||
super(Core.files.internal("shaders/" + vert + ".vert"), Core.files.internal("shaders/" + frag + ".frag"));
|
||||
this(frag, vert, false);
|
||||
}
|
||||
|
||||
public LoadShader(String frag, String vert, boolean preprocess){
|
||||
super(
|
||||
preprocess && Core.gl30 != null && Vars.useArrayTextures ? ArrayTextureSpriteBatch.preprocessShader(
|
||||
Core.files.internal("shaders/" + vert + ".vert").readString(), false) :
|
||||
Core.files.internal("shaders/" + vert + ".vert").readString(),
|
||||
preprocess && Core.gl30 != null && Vars.useArrayTextures ? ArrayTextureSpriteBatch.preprocessShader(
|
||||
Core.files.internal("shaders/" + frag + ".frag").readString(), true) :
|
||||
Core.files.internal("shaders/" + frag + ".frag").readString()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,9 +218,8 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
|
||||
if(doBuffer){
|
||||
buffer.end();
|
||||
Draw.color(color);
|
||||
Draw.rect(Draw.wrap(buffer.getTexture()), Core.graphics.getWidth()/2f, Core.graphics.getHeight()/2f, Core.graphics.getWidth(), -Core.graphics.getHeight());
|
||||
Draw.color();
|
||||
|
||||
buffer.blit(Shaders.screenspace);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
org.gradle.daemon=true
|
||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||
archash=5d845b94754aa9667c60de503624ff2a51df6e64
|
||||
archash=c35b04d61dcdfe42146739d9889a99ef426f9641
|
||||
|
||||