Removal of unused assets/classes

This commit is contained in:
Anuken
2020-05-11 00:41:35 -04:00
parent a344c1a5d0
commit 3ea2360290
22 changed files with 35 additions and 221 deletions
+1 -3
View File
@@ -13,9 +13,7 @@ uniform float OriginalIntensity;
varying MED vec2 v_texCoords;
void main()
{
void main(){
vec4 original = texture2D(u_texture0, v_texCoords) * OriginalIntensity;
vec4 bloom = texture2D(u_texture1, v_texCoords) * BloomIntensity;
original = original * (vec4(1.0) - bloom);
+1 -2
View File
@@ -16,8 +16,7 @@ varying MED vec2 v_texCoords4;
const float center = 0.2270270270;
const float close = 0.3162162162;
const float far = 0.0702702703;
void main()
{
void main(){
gl_FragColor = far * texture2D(u_texture, v_texCoords0)
+ close * texture2D(u_texture, v_texCoords1)
+ center * texture2D(u_texture, v_texCoords2)
@@ -9,8 +9,7 @@ precision lowp float;
uniform sampler2D u_texture0;
uniform vec2 threshold;
varying MED vec2 v_texCoords;
void main()
{
void main(){
vec4 color = texture2D(u_texture0, v_texCoords);
if(color.r + color.g + color.b > 0.5 * 3.0){
gl_FragColor = color;
+1 -2
View File
@@ -13,8 +13,7 @@ uniform float OriginalIntensity;
varying MED vec2 v_texCoords;
void main()
{
void main(){
vec3 original = texture2D(u_texture0, v_texCoords).rgb;
vec3 bloom = texture2D(u_texture1, v_texCoords).rgb * BloomIntensity;
+2 -2
View File
@@ -15,8 +15,8 @@ varying MED vec2 v_texCoords3;
varying MED vec2 v_texCoords4;
const vec2 futher = vec2(3.2307692308, 3.2307692308);
const vec2 closer = vec2(1.3846153846, 1.3846153846);
void main()
{
void main(){
vec2 sizeAndDir = dir / size;
vec2 f = futher*sizeAndDir;
vec2 c = closer*sizeAndDir;
+1 -2
View File
@@ -16,8 +16,7 @@ varying MED vec2 v_texCoords4;
const float center = 0.2270270270;
const float close = 0.3162162162;
const float far = 0.0702702703;
void main()
{
void main(){
gl_FragColor.rgb = far * texture2D(u_texture, v_texCoords0).rgb
+ close * texture2D(u_texture, v_texCoords1).rgb
+ center * texture2D(u_texture, v_texCoords2).rgb
+2 -2
View File
@@ -9,8 +9,8 @@ precision lowp float;
uniform sampler2D u_texture0;
uniform vec2 threshold;
varying MED vec2 v_texCoords;
void main()
{
void main(){
vec4 tex = texture2D(u_texture0, v_texCoords);
vec3 colors = (tex.rgb - threshold.r) * threshold.g * tex.a;
gl_FragColor = vec4(colors, tex.a);
+2 -2
View File
@@ -6,8 +6,8 @@
attribute vec4 a_position;
attribute vec2 a_texCoord0;
varying MED vec2 v_texCoords;
void main()
{
void main(){
v_texCoords = a_texCoord0;
gl_Position = a_position;
}
+2 -2
View File
@@ -9,7 +9,7 @@ precision lowp float;
uniform sampler2D u_texture0;
uniform vec2 threshold;
varying MED vec2 v_texCoords;
void main()
{
void main(){
gl_FragColor.rgb = (texture2D(u_texture0, v_texCoords).rgb - vec3(threshold.x)) * threshold.y;
}
+1 -1
View File
@@ -9,7 +9,7 @@ varying vec2 v_texCoord;
uniform vec2 u_viewportInverse;
void main() {
void main(){
gl_Position = u_projTrans * a_position;
v_texCoord = a_texCoord0;
v_color = a_color;
-1
View File
@@ -13,6 +13,5 @@ varying vec2 v_texCoord;
void main(){
vec4 color = texture2D(u_texture, v_texCoord.xy);
//color.a = clamp(color.a, 0.0, 0.8);
gl_FragColor = clamp(vec4(mix(u_ambient.rgb, color.rgb, color.a), u_ambient.a - color.a), 0.0, 1.0);
}
-44
View File
@@ -1,44 +0,0 @@
#ifdef GL_ES
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
#define roundm 0.2
uniform sampler2D u_texture;
uniform vec2 u_resolution;
uniform int u_time;
uniform vec2 u_uv;
uniform vec2 u_uv2;
uniform float u_scl;
varying vec4 v_color;
varying vec2 v_texCoord;
void main() {
ivec2 coords = ivec2((gl_FragCoord.xy - u_resolution/2.0)/u_scl);
//int roundx = 8;
//int roundy = roundx;
//coords.x = (coords.x / roundx) * roundx;
//coords.y = (coords.y / roundy) * roundy;
float d = (abs(float(coords.x)) - abs(float(coords.y)));
float m = abs(sin(-float(u_time)/50.0 + d/120.0));
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.rgb *= 0.5;
gl_FragColor.a = mod(abs(float(coords.x)) + abs(float(coords.y)), 110.0) < 35.0 ? 1.0 : 0.0;
}
-44
View File
@@ -1,44 +0,0 @@
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
#define SPACE 2.0
uniform sampler2D u_texture;
uniform vec4 u_color;
uniform vec2 u_texsize;
uniform float u_scl;
varying vec4 v_color;
varying vec2 v_texCoord;
void main() {
vec2 v = vec2(1.0/u_texsize.x, 1.0/u_texsize.y);
vec4 c = texture2D(u_texture, v_texCoord.xy);
float spacing = SPACE * u_scl;
gl_FragColor = mix(vec4(0.0, 0.0, 0.0, min(c.a, u_color.a)), u_color,
(1.0-step(0.001, texture2D(u_texture, v_texCoord.xy).a)) *
step(0.001,
//cardinals
texture2D(u_texture, v_texCoord.xy + vec2(0, spacing) * v).a +
texture2D(u_texture, v_texCoord.xy + vec2(0, -spacing) * v).a +
texture2D(u_texture, v_texCoord.xy + vec2(spacing, 0) * v).a +
texture2D(u_texture, v_texCoord.xy + vec2(-spacing, 0) * v).a +
//cardinal edges
texture2D(u_texture, v_texCoord.xy + vec2(spacing, spacing) * v).a +
texture2D(u_texture, v_texCoord.xy + vec2(spacing, -spacing) * v).a +
texture2D(u_texture, v_texCoord.xy + vec2(-spacing, spacing) * v).a +
texture2D(u_texture, v_texCoord.xy + vec2(-spacing, -spacing) * v).a +
//cardinals * 2
texture2D(u_texture, v_texCoord.xy + vec2(0, spacing) * v*2.0).a +
texture2D(u_texture, v_texCoord.xy + vec2(0, -spacing) * v*2.0).a +
texture2D(u_texture, v_texCoord.xy + vec2(spacing, 0) * v*2.0).a +
texture2D(u_texture, v_texCoord.xy + vec2(-spacing, 0) * v*2.0).a
));
}
+1 -2
View File
@@ -18,8 +18,7 @@ uniform vec2 u_offset;
varying vec4 v_color;
varying vec2 v_texCoord;
void main() {
void main(){
vec2 T = v_texCoord.xy;
vec2 coords = (T * u_texsize) + u_offset;
-45
View File
@@ -1,45 +0,0 @@
#define LIGHT
#ifdef LIGHT
#define LAYERS 30.
#define DEPTH .5
#define WIDTH .3
#define SPEED .6
#define SIZE 0.2
#else
#define LAYERS 200.
#define DEPTH .1
#define WIDTH .8
#define SPEED 1.5
#define SIZE 1.0
#endif
varying vec2 v_texCoords;
uniform vec2 u_pos;
uniform vec2 u_resolution;
uniform float u_time;
uniform sampler2D u_texture0;
void main(){
gl_FragColor = texture2D(u_texture0, v_texCoords);
vec2 uv = (v_texCoords * u_resolution + u_pos) / 1000.0;
const mat3 p = mat3(
13.3231, 23.5112, 21.7112,
21.1212, 28.7312, 11.9312,
21.8112, 14.7212, 61.3934
);
float dof = 5.*sin(u_time*.1);
//TODO this is very slow
for(float i=0.0; i<LAYERS; i++){
vec2 q = uv* (1.+i*DEPTH);
q += vec2(q.y* WIDTH * (fract(i*7.238917) - .5), SPEED * u_time / (1.+i*DEPTH*.03));
vec3 n = vec3(floor(q), 31.189+i), m = floor(n)/1e5 + fract(n), mp = (31.9+m) / fract(p*m), r = fract(mp);
vec2 s = abs(fract(q)-.5 +.9*r.xy-.45) + .01*abs(2.0*fract(10.*q.yx) - 1.0);
float d = .6 * (s.x+s.y) + max(s.x,s.y) -.01, edge = .005*SIZE + .05 * SIZE * min(.5* abs(i-5.-dof), 1.);
gl_FragColor += smoothstep(edge,-edge,d) * r.x / (1.+.02*i*DEPTH);
}
}