1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-09-11 08:15:35 +03:00

Merged 4x graphics

This commit is contained in:
Anuken 2018-12-28 23:46:09 -05:00
commit 36b27458b6
137 changed files with 2985 additions and 3045 deletions

1
.gitignore vendored
View File

@ -13,6 +13,7 @@ logs/
/desktop/gifexport/
/core/lib/
/core/assets-raw/sprites/generated/
/core/assets-raw/sprites_out/
/annotations/build/
/net/build/
/tools/build/

View File

@ -49,6 +49,8 @@ public class AndroidLauncher extends AndroidApplication{
super.onCreate(savedInstanceState);
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
config.useImmersiveMode = true;
config.numSamples = 2;
config.depth = 0;
Platform.instance = new Platform(){
@Override

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 B

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 B

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 B

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 B

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 B

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 B

After

Width:  |  Height:  |  Size: 221 B

View File

Before

Width:  |  Height:  |  Size: 70 B

After

Width:  |  Height:  |  Size: 70 B

View File

@ -2,5 +2,7 @@
duplicatePadding: true,
combineSubdirectories: true,
flattenPaths: true,
fast: true
maxWidth: 2048,
maxHeight: 2048,
fast: true,
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 B

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 B

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 B

After

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 284 B

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 B

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 B

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 B

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 B

View File

Before

Width:  |  Height:  |  Size: 68 B

After

Width:  |  Height:  |  Size: 68 B

View File

Before

Width:  |  Height:  |  Size: 883 B

After

Width:  |  Height:  |  Size: 883 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

View File

Before

Width:  |  Height:  |  Size: 200 B

After

Width:  |  Height:  |  Size: 200 B

View File

@ -29,10 +29,6 @@ bool cont(vec2 T, vec2 v){
id(T + vec2(step, 0) * v, base) || id(T + vec2(-step, 0) * v, base));
}
float rand(vec2 co){
return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
}
void main() {
vec2 t = v_texCoord.xy;
@ -51,11 +47,11 @@ void main() {
chance = 1.0-(u_progress-0.8)*5.0;
}
if((mod(u_time / 1.5 + value, 20.0) < 5.0 && cont(t, v)) && rand(coords) < chance){
if((mod(u_time / 1.5 + value, 20.0) < 5.0 && cont(t, v))){
gl_FragColor = u_color;
}else if(dst > (1.0-u_progress) * (center.x)){
gl_FragColor = color;
}else if((dst + 1.0 > (1.0-u_progress) * (center.x)) && color.a > 0.1 && rand(coords) < chance){
}else if((dst + 1.0 > (1.0-u_progress) * (center.x)) && color.a > 0.1){
gl_FragColor = u_color;
}else{
gl_FragColor = vec4(0.0);

View File

@ -29,18 +29,11 @@ void main() {
vec4 c = texture2D(u_texture, v_texCoord.xy);
vec2 v = vec2(1.0/u_texsize.x, 1.0/u_texsize.y);
float step = 1.0;
bool outline = texture2D(u_texture, t).a < 0.1 &&
(id(texture2D(u_texture, t + vec2(0, step) * v)) || id(texture2D(u_texture, t + vec2(0, -step) * v)) ||
id(texture2D(u_texture, t + vec2(step, 0) * v)) || id(texture2D(u_texture, t + vec2(-step, 0) * v)));
if(1.0-abs(coords.x - 0.5)*2.0 < 1.0-u_progress){
c = vec4(0.0);
}
if(c.a > 0.01 || outline){
if(c.a > 0.01){
float f = abs(sin(coords.x*2.0 + u_time));
if(f > 0.9 )
f = 1.0;

View File

@ -7,6 +7,7 @@ precision mediump int;
#define p2 vec3(234.0,182.0,120.0)/255.0
#define p3 vec3(212.0,129.0,107.0)/255.0
#define p4 vec3(142.0,77.0,72.0)/255.0
#define roundm 0.2
uniform sampler2D u_texture;
uniform vec2 u_resolution;
@ -21,12 +22,11 @@ varying vec2 v_texCoord;
void main() {
ivec2 coords = ivec2((gl_FragCoord.xy - u_resolution/2.0)/u_scl);
int roundx = 8;
int roundy = roundx;
float roundm = 0.2;
//int roundx = 8;
//int roundy = roundx;
coords.x = (coords.x / roundx) * roundx;
coords.y = (coords.y / roundy) * roundy;
//coords.x = (coords.x / roundx) * roundx;
//coords.y = (coords.y / roundy) * roundy;
float d = (abs(float(coords.x)) - abs(float(coords.y)));

View File

@ -3,7 +3,7 @@ precision mediump float;
precision mediump int;
#endif
#define SPACE 1.0
#define SPACE 2.0
uniform sampler2D u_texture;
@ -20,8 +20,23 @@ void main() {
gl_FragColor = mix(c * v_color, u_color,
(1.0-step(0.1, texture2D(u_texture, v_texCoord.xy).a)) *
step(0.1, texture2D(u_texture, v_texCoord.xy + vec2(0, SPACE) * v).a +
step(0.1,
//cardinals
texture2D(u_texture, v_texCoord.xy + vec2(0, SPACE) * v).a +
texture2D(u_texture, v_texCoord.xy + vec2(0, -SPACE) * v).a +
texture2D(u_texture, v_texCoord.xy + vec2(SPACE, 0) * v).a +
texture2D(u_texture, v_texCoord.xy + vec2(-SPACE, 0) * v).a));
texture2D(u_texture, v_texCoord.xy + vec2(-SPACE, 0) * v).a +
//cardinal edges
texture2D(u_texture, v_texCoord.xy + vec2(SPACE, SPACE) * v).a +
texture2D(u_texture, v_texCoord.xy + vec2(SPACE, -SPACE) * v).a +
texture2D(u_texture, v_texCoord.xy + vec2(-SPACE, SPACE) * v).a +
texture2D(u_texture, v_texCoord.xy + vec2(-SPACE, -SPACE) * v).a +
//cardinals * 2
texture2D(u_texture, v_texCoord.xy + vec2(0, SPACE) * v*2.0).a +
texture2D(u_texture, v_texCoord.xy + vec2(0, -SPACE) * v*2.0).a +
texture2D(u_texture, v_texCoord.xy + vec2(SPACE, 0) * v*2.0).a +
texture2D(u_texture, v_texCoord.xy + vec2(-SPACE, 0) * v*2.0).a
));
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 327 KiB

View File

@ -160,9 +160,7 @@ public class Blocks extends BlockList implements ContentList{
minimapColor = Color.valueOf("549d5b");
}};
shrub = new Rock("shrub"){{
shadow = "shrubshadow";
}};
shrub = new Rock("shrub");
rock = new Rock("rock"){{
variants = 2;

View File

@ -40,7 +40,6 @@ public class DebugBlocks extends BlockList implements ContentList{
powerVoid = new PowerBlock("powervoid"){
{
powerCapacity = Float.MAX_VALUE;
shadow = "shadow-round-1";
}
@Override
@ -56,7 +55,6 @@ public class DebugBlocks extends BlockList implements ContentList{
maxNodes = 100;
outputsPower = true;
consumesPower = false;
shadow = "shadow-round-1";
}
@Override

View File

@ -12,13 +12,11 @@ public class LiquidBlocks extends BlockList implements ContentList{
public void load(){
mechanicalPump = new Pump("mechanical-pump"){{
shadow = "shadow-round-1";
pumpAmount = 0.1f;
tier = 0;
}};
rotaryPump = new Pump("rotary-pump"){{
shadow = "shadow-rounded-2";
pumpAmount = 0.2f;
consumes.power(0.015f);
liquidCapacity = 30f;
@ -29,7 +27,6 @@ public class LiquidBlocks extends BlockList implements ContentList{
}};
thermalPump = new Pump("thermal-pump"){{
shadow = "shadow-rounded-2";
pumpAmount = 0.275f;
consumes.power(0.03f);
liquidCapacity = 40f;

Some files were not shown because too many files have changed in this diff Show More