代码规范:把所有的tab换成空格
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
extern float a;
|
||||
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){
|
||||
return vec4(1.,1.,1.,sign(Texel(tex,tex_coords).a)*a);
|
||||
return vec4(1.,1.,1.,sign(Texel(tex,tex_coords).a)*a);
|
||||
}
|
||||
@@ -2,41 +2,41 @@
|
||||
extern float w,h;
|
||||
extern float t;
|
||||
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){
|
||||
float x=scr_coords.x/w;
|
||||
float y=scr_coords.y/h;
|
||||
float dx,dy;
|
||||
vec3 V=vec3(0.);
|
||||
float x=scr_coords.x/w;
|
||||
float y=scr_coords.y/h;
|
||||
float dx,dy;
|
||||
vec3 V=vec3(0.);
|
||||
|
||||
dx=0.5+cos(t*3.*0.26)*0.4-x;
|
||||
dy=0.5-sin(t*3.*0.62)*0.4-y;
|
||||
dx=sqrt(dx*dx+dy*dy);
|
||||
V.r=V.r+smoothstep(1.26,0.,dx);
|
||||
dx=0.5+cos(t*3.*0.26)*0.4-x;
|
||||
dy=0.5-sin(t*3.*0.62)*0.4-y;
|
||||
dx=sqrt(dx*dx+dy*dy);
|
||||
V.r=V.r+smoothstep(1.26,0.,dx);
|
||||
|
||||
dx=(0.5+cos(t*3.*0.32)*0.4)-x;
|
||||
dy=(0.5-sin(t*3.*0.80)*0.4)-y;
|
||||
dx=sqrt(dx*dx+dy*dy);
|
||||
V.g=V.g+smoothstep(1.26,0.,dx);
|
||||
dx=(0.5+cos(t*3.*0.32)*0.4)-x;
|
||||
dy=(0.5-sin(t*3.*0.80)*0.4)-y;
|
||||
dx=sqrt(dx*dx+dy*dy);
|
||||
V.g=V.g+smoothstep(1.26,0.,dx);
|
||||
|
||||
dx=(0.5-cos(t*3.*0.49)*0.4)-x;
|
||||
dy=(0.5+sin(t*3.*0.18)*0.4)-y;
|
||||
dx=sqrt(dx*dx+dy*dy);
|
||||
V.b=V.b+smoothstep(1.26,0.,dx);
|
||||
dx=(0.5-cos(t*3.*0.49)*0.4)-x;
|
||||
dy=(0.5+sin(t*3.*0.18)*0.4)-y;
|
||||
dx=sqrt(dx*dx+dy*dy);
|
||||
V.b=V.b+smoothstep(1.26,0.,dx);
|
||||
|
||||
dx=(0.5+cos(t*0.53)*0.4)-x;
|
||||
dy=(0.5-sin(t*0.46)*0.4)-y;
|
||||
dx=sqrt(dx*dx+dy*dy);
|
||||
V.rg+=vec2(smoothstep(0.626,0.,dx));
|
||||
dx=(0.5+cos(t*0.53)*0.4)-x;
|
||||
dy=(0.5-sin(t*0.46)*0.4)-y;
|
||||
dx=sqrt(dx*dx+dy*dy);
|
||||
V.rg+=vec2(smoothstep(0.626,0.,dx));
|
||||
|
||||
dx=(0.5+cos(t*0.98)*0.4)-x;
|
||||
dy=(0.5+sin(t*0.57)*0.4)-y;
|
||||
dx=sqrt(dx*dx+dy*dy);
|
||||
V.rb+=vec2(smoothstep(0.626,0.,dx));
|
||||
dx=(0.5+cos(t*0.98)*0.4)-x;
|
||||
dy=(0.5+sin(t*0.57)*0.4)-y;
|
||||
dx=sqrt(dx*dx+dy*dy);
|
||||
V.rb+=vec2(smoothstep(0.626,0.,dx));
|
||||
|
||||
dx=(0.5-cos(t*0.86)*0.4)-x;
|
||||
dy=(0.5-sin(t*0.32)*0.4)-y;
|
||||
dx=sqrt(dx*dx+dy*dy);
|
||||
V.gb+=vec2(smoothstep(0.626,0.,dx));
|
||||
dx=(0.5-cos(t*0.86)*0.4)-x;
|
||||
dy=(0.5-sin(t*0.32)*0.4)-y;
|
||||
dx=sqrt(dx*dx+dy*dy);
|
||||
V.gb+=vec2(smoothstep(0.626,0.,dx));
|
||||
|
||||
dx=1.626*max(max(V.r,V.g),V.b);
|
||||
return vec4(V/dx,0.4);
|
||||
dx=1.626*max(max(V.r,V.g),V.b);
|
||||
return vec4(V/dx,0.4);
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
extern float k,b;
|
||||
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){
|
||||
vec4 texcolor=Texel(tex,tex_coords);
|
||||
return vec4(
|
||||
(b+texcolor.r*k)*color.r,
|
||||
(b+texcolor.g*k)*color.g,
|
||||
(b+texcolor.b*k)*color.b,
|
||||
texcolor.a*color.a
|
||||
);
|
||||
vec4 texcolor=Texel(tex,tex_coords);
|
||||
return vec4(
|
||||
(b+texcolor.r*k)*color.r,
|
||||
(b+texcolor.g*k)*color.g,
|
||||
(b+texcolor.b*k)*color.b,
|
||||
texcolor.a*color.a
|
||||
);
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
extern float k,b;
|
||||
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){
|
||||
vec4 texcolor=Texel(tex,tex_coords);
|
||||
return vec4(
|
||||
(b+texcolor.r*k)*color.r,
|
||||
(b+texcolor.g*k)*color.g,
|
||||
(b+texcolor.b*k)*color.b,
|
||||
texcolor.a*color.a
|
||||
);
|
||||
vec4 texcolor=Texel(tex,tex_coords);
|
||||
return vec4(
|
||||
(b+texcolor.r*k)*color.r,
|
||||
(b+texcolor.g*k)*color.g,
|
||||
(b+texcolor.b*k)*color.b,
|
||||
texcolor.a*color.a
|
||||
);
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
extern float t,w;
|
||||
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){
|
||||
float x=scr_coords.x/w;
|
||||
return vec4(
|
||||
.8-x*.6,
|
||||
.3+.2*sin(t),
|
||||
.15+x*.7,
|
||||
.4
|
||||
);
|
||||
float x=scr_coords.x/w;
|
||||
return vec4(
|
||||
.8-x*.6,
|
||||
.3+.2*sin(t),
|
||||
.15+x*.7,
|
||||
.4
|
||||
);
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
extern float t,h;
|
||||
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){
|
||||
float y=scr_coords.y/h;
|
||||
return vec4(
|
||||
.8-y*.6,
|
||||
.2+y*.4,
|
||||
.3+.1*sin(t),
|
||||
.4
|
||||
);
|
||||
float y=scr_coords.y/h;
|
||||
return vec4(
|
||||
.8-y*.6,
|
||||
.2+y*.4,
|
||||
.3+.1*sin(t),
|
||||
.4
|
||||
);
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){
|
||||
vec4 texcolor=Texel(tex,tex_coords);
|
||||
return vec4(
|
||||
pow(texcolor.r+.26,.7023),
|
||||
pow(texcolor.g+.26,.7023),
|
||||
pow(texcolor.b+.26,.7023),
|
||||
texcolor.a*color.a
|
||||
);
|
||||
vec4 texcolor=Texel(tex,tex_coords);
|
||||
return vec4(
|
||||
pow(texcolor.r+.26,.7023),
|
||||
pow(texcolor.g+.26,.7023),
|
||||
pow(texcolor.b+.26,.7023),
|
||||
texcolor.a*color.a
|
||||
);
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
extern float t,w,h;
|
||||
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){
|
||||
float x=scr_coords.x/w;
|
||||
float y=scr_coords.y/h;
|
||||
return vec4(
|
||||
.8-y*.7+.2*sin(t/6.26),
|
||||
.2+y*.5+.15*sin(t/4.),
|
||||
.2+x*.6-.1*sin(t/2.83),
|
||||
.4
|
||||
);
|
||||
float x=scr_coords.x/w;
|
||||
float y=scr_coords.y/h;
|
||||
return vec4(
|
||||
.8-y*.7+.2*sin(t/6.26),
|
||||
.2+y*.5+.15*sin(t/4.),
|
||||
.2+x*.6-.1*sin(t/2.83),
|
||||
.4
|
||||
);
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
extern float t,w,h;
|
||||
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){
|
||||
float x=scr_coords.x/w;
|
||||
float y=scr_coords.y/h;
|
||||
return vec4(
|
||||
.8-y*.8-.1*sin(t/6.26),
|
||||
.4+.1*sin(t/4.)*(y+2.)/(y+5.),
|
||||
abs(.7-x*1.4+y*.5*sin(t/16.)),
|
||||
.4
|
||||
);
|
||||
float x=scr_coords.x/w;
|
||||
float y=scr_coords.y/h;
|
||||
return vec4(
|
||||
.8-y*.8-.1*sin(t/6.26),
|
||||
.4+.1*sin(t/4.)*(y+2.)/(y+5.),
|
||||
abs(.7-x*1.4+y*.5*sin(t/16.)),
|
||||
.4
|
||||
);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
extern float w,level;
|
||||
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){
|
||||
float dx=abs(scr_coords.x/w-0.5);
|
||||
float a=(dx*2.6-.626)*level;
|
||||
return vec4(1.,0.,0.,a);
|
||||
float dx=abs(scr_coords.x/w-0.5);
|
||||
float a=(dx*2.6-.626)*level;
|
||||
return vec4(1.,0.,0.,a);
|
||||
}
|
||||
Reference in New Issue
Block a user