Species Component (#130)

* Fix this
fug
oksure
Creates the initial species component, damage states, and threshold templates and hooks them into the damageable component

* More rebase fixes

* test

* Pre future rebase

* Please

* Lol

* Lol2

* SHADERS

* Update Engine

* yml file

* Fix an initialization issue, injects dependencies

* Fix error in loading shaders

* Makes a master character ui controller component added upon client attachment to entity and remove upon client detachment from entity

* Fixes just about everytrhing

* Address PJB's comments

* geeze

* Make overlays work in worldspace instead of screen space and not cover user interfaces

* update submodule
This commit is contained in:
clusterfack
2018-12-13 07:47:19 -06:00
committed by Pieter-Jan Briers
parent b8becf4a56
commit 37df61113e
52 changed files with 1172 additions and 183 deletions

View File

@@ -0,0 +1,16 @@
shader_type canvas_item;
float circle(in vec2 _st, in float _radius){
vec2 dist = _st-vec2(0.5);
return smoothstep(_radius-(_radius*0.01),
_radius+(_radius*0.01),
dot(dist,dist)*4.0);
}
void fragment(){
vec2 st = FRAGCOORD.xy*SCREEN_PIXEL_SIZE.xy;
COLOR = texture(TEXTURE, UV);
COLOR.rgb = vec3(0);
COLOR.a = circle(st,0.05);
}

View File

@@ -0,0 +1,10 @@
shader_type canvas_item;
uniform float percentagedistanceshow = 0.1;
uniform float gradientfalloffwidth = 0.2;
void fragment() {
float dist = distance(UV, vec2(0.5, 0.5));
float fromdiskdist = dist - percentagedistanceshow;
COLOR.a = max(0, min(1.0, 2.0*dist/percentagedistanceshow - 2.0));
COLOR.rgb = vec3(1,1,1) - vec3(fromdiskdist,fromdiskdist,fromdiskdist)/gradientfalloffwidth;
}