Added fullscreen, player outlines, better weapon display

This commit is contained in:
Anuken
2018-01-29 15:24:10 -05:00
parent 5b25d94a3e
commit aaa9f85206
26 changed files with 320 additions and 189 deletions
+2
View File
@@ -215,6 +215,7 @@ setting.effects.name=Display Effects
setting.sensitivity.name=Controller Sensitivity
setting.saveinterval.name=Autosave Interval
setting.seconds={0} Seconds
setting.fullscreen.name=Fullscreen
setting.fps.name=Show FPS
setting.vsync.name=VSync
setting.lasers.name=Show Power Lasers
@@ -329,6 +330,7 @@ liquid.plasma.name=plasma
liquid.lava.name=lava
liquid.oil.name=oil
block.weaponfactory.name=weapon factory
block.weaponfactory.fulldescription=Used to create weapons for the player mech. Click to use. Automatically takes resources from the core.
block.air.name=air
block.blockpart.name=blockpart
block.deepwater.name=deepwater
+12 -5
View File
@@ -12,6 +12,10 @@ uniform float u_lighten;
varying vec4 v_color;
varying vec2 v_texCoord;
bool id(vec4 v){
return v.a > 0.1 && !(v.r < 0.01 && v.g < 0.01 && v.b < 0.01);
}
void main() {
vec2 T = v_texCoord.xy;
@@ -20,18 +24,21 @@ void main() {
bool any = false;
float thickness = 1.0;
float step = 1.0;
if(texture2D(u_texture, T).a < 0.1 &&
(texture2D(u_texture, T + vec2(0, step) * v).a > 0.1 || texture2D(u_texture, T + vec2(0, -step) * v).a > 0.1 ||
texture2D(u_texture, T + vec2(step, 0) * v).a > 0.1 || texture2D(u_texture, T + vec2(-step, 0) * v).a > 0.1))
vec4 c = texture2D(u_texture, T);
if(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))))
any = true;
if(any){
gl_FragColor = u_color;
}else{
vec4 c = texture2D(u_texture, T);
if((c.r < 0.01 && c.g < 0.01 && c.b < 0.01)){
c = vec4(0.0);
}
gl_FragColor = mix(c, vec4(1.0, 1.0, 1.0, c.a), u_lighten) * v_color;
}
}
File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 81 KiB