mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-31 07:00:06 +07:00
New UI palette
This commit is contained in:
@ -3,6 +3,11 @@ precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
#define p1 vec3(255.0,211.0,127.0)/255.0
|
||||
#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
|
||||
|
||||
uniform sampler2D u_texture;
|
||||
uniform vec2 u_resolution;
|
||||
uniform int u_time;
|
||||
@ -26,8 +31,12 @@ void main() {
|
||||
float d = (abs(float(coords.x)) - abs(float(coords.y)));
|
||||
|
||||
float m = abs(sin(-float(u_time)/50.0 + d/120.0));
|
||||
m = float(int(m / roundm)) * roundm + roundm;
|
||||
|
||||
gl_FragColor.rgb = mix(v_color.rgb, vec3(0.0), m);
|
||||
if(m > 0.95) gl_FragColor.rgb = p1;
|
||||
else if(m > 0.75) gl_FragColor.rgb = p2;
|
||||
else if(m > 0.55) gl_FragColor.rgb = p3;
|
||||
else if(m > 0.35) gl_FragColor.rgb = p4;
|
||||
else gl_FragColor.rgb = vec3(0.0);
|
||||
|
||||
gl_FragColor.a = mod(abs(float(coords.x)) + abs(float(coords.y)), 110.0) < 35.0 ? 1.0 : 0.0;
|
||||
}
|
Reference in New Issue
Block a user