Fixed positions jumping with shader zoom-out

This commit is contained in:
Anuken
2018-03-14 14:13:06 -04:00
parent 99c12595a9
commit a023c4fbac
6 changed files with 22 additions and 39 deletions
+9 -6
View File
@@ -1,5 +1,5 @@
#ifdef GL_ES
precision mediump float;
precision highp float;
precision mediump int;
#endif
@@ -72,14 +72,17 @@ void main() {
color = old;
}
float n1 = snoise(coords / 20.0 + vec2(time) / 250.0);
float n2 = snoise((coords + vec2(632.0)) / 9.0 + vec2(0.0, -time) / 220.0);
const float bs = 1.0;
float r = (n1 + n2) / 2.0;
float n1 = snoise(coords / (20.0 * bs) + vec2(time) / 250.0);
float n2 = snoise((coords + vec2(632.0)) / (9.0 * bs) + vec2(0.0, -time) / 220.0);
float n3 = snoise((coords + vec2(2233.0)) / (15.0 * bs) + vec2(time, 0.0) / 290.0);
if(r < -0.6){
float r = (n1 + n2 + n3) / 3.0;
if(r < -0.5){
color = s2;
}else if(r < -0.2 && r > -0.6){
}else if(r < -0.2){
color = s1;
}
}
+2 -2
View File
@@ -1,5 +1,5 @@
#ifdef GL_ES
precision mediump float;
precision highp float;
precision mediump int;
#endif
@@ -77,7 +77,7 @@ void main() {
float r = (n1 + n2) / 2.0;
if(r < -0.3 && r > -0.6){
color *= 1.3;
color *= 1.4;
color.a = 1.0;
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
#ifdef GL_ES
precision mediump float;
precision highp float;
precision mediump int;
#endif
+2 -2
View File
@@ -1,7 +1,7 @@
#Autogenerated file. Do not modify.
#Wed Mar 14 12:49:40 EDT 2018
#Wed Mar 14 14:12:06 EDT 2018
version=release
androidBuildCode=491
androidBuildCode=496
name=Mindustry
code=3.4
build=custom build