GLES2: More shader stuff to get things working
This commit is contained in:
@@ -12,14 +12,18 @@ void fragment() {
|
||||
highp float angle = atan(delta.x, -delta.y) + PI;
|
||||
|
||||
highp float dist = length(delta);
|
||||
#ifdef HAS_DFDX
|
||||
highp float dist_fwidth = fwidth(dist) * 0.67;
|
||||
#else
|
||||
highp float dist_fwidth = 0.05;
|
||||
#endif
|
||||
|
||||
highp float dist_alpha = smoothstep(0.1-dist_fwidth, 0.1, abs(dist-0.35));
|
||||
|
||||
highp float angle_delta = (progress * PI * 2.0) - angle;
|
||||
highp float arc_length = angle_delta * dist;
|
||||
|
||||
highp float angle_alpha = progress > 0 ? smoothstep(dist_fwidth, 0.0, arc_length) : 0.0;
|
||||
highp float angle_alpha = (progress > 0.0) ? smoothstep(dist_fwidth, 0.0, arc_length) : 0.0;
|
||||
|
||||
COLOR = vec4(col.xyz, 1-max(dist_alpha, angle_alpha));
|
||||
COLOR = vec4(col.xyz, 1.0 - max(dist_alpha, angle_alpha));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
uniform highp float percentComplete;
|
||||
uniform highp float fadeFalloffExp = 8.0;
|
||||
const highp float fadeFalloffExp = 8.0;
|
||||
|
||||
void fragment() {
|
||||
// Higher exponent -> stronger blinding effect
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
uniform highp float percentagedistanceshow = 0.05;
|
||||
uniform highp float gradientfalloffwidth = 3.0;
|
||||
const highp float percentagedistanceshow = 0.05;
|
||||
const highp float gradientfalloffwidth = 3.0;
|
||||
|
||||
highp vec4 circle(in highp vec2 uv, in highp vec2 pos, highp float rad, in highp vec3 color) {
|
||||
highp float d = length(pos - uv) - rad;
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
|
||||
light_mode unshaded;
|
||||
//shader_type canvas_item;
|
||||
uniform highp float outline_width = 2.0;
|
||||
uniform highp float outline_width; // = 2.0;
|
||||
// TODO: implement that hint_color thingy.
|
||||
//uniform vec4 outline_color: hint_color;
|
||||
uniform highp vec4 outline_color=vec4(1.0,0.0,0.0,0.33);
|
||||
uniform highp vec4 outline_color; // =vec4(1.0,0.0,0.0,0.33);
|
||||
|
||||
void fragment() {
|
||||
highp vec4 col = texture2D(TEXTURE, UV);
|
||||
|
||||
Reference in New Issue
Block a user