- removed 0 CR characters - removed 12 trailing whitespaces - replaced 245 tabs with spacesmaster
@@ -3,10 +3,10 @@ | |||
#version 120 | |||
void main() | |||
{ | |||
gl_Position=gl_Vertex; | |||
gl_TexCoord[0]=gl_MultiTexCoord0; | |||
} | |||
{ | |||
gl_Position=gl_Vertex; | |||
gl_TexCoord[0]=gl_MultiTexCoord0; | |||
} | |||
-- GLSL.Frag -- | |||
@@ -16,19 +16,19 @@ uniform sampler2D texture; | |||
uniform vec2 radius; | |||
void main(void) | |||
{ | |||
vec4 total=vec4(0.0); | |||
vec2 p=gl_TexCoord[0].xy; | |||
float mask=2.0-p.x*(6.0-p.x*6.0)*p.y*(6.0-p.y*6.0); | |||
float b=radius.x+radius.y*mask; | |||
total+=texture2D(texture,vec2(p.x-b*4.0,p.y))*0.04; | |||
total+=texture2D(texture,vec2(p.x-b*3.0,p.y))*0.08; | |||
total+=texture2D(texture,vec2(p.x-b*2.0,p.y))*0.12; | |||
total+=texture2D(texture,vec2(p.x-b ,p.y))*0.16; | |||
total+=texture2D(texture,vec2(p.x ,p.y))*0.20; | |||
total+=texture2D(texture,vec2(p.x+b ,p.y))*0.16; | |||
total+=texture2D(texture,vec2(p.x+b*2.0,p.y))*0.12; | |||
total+=texture2D(texture,vec2(p.x+b*3.0,p.y))*0.08; | |||
total+=texture2D(texture,vec2(p.x+b*4.0,p.y))*0.04; | |||
gl_FragColor=total; | |||
} | |||
{ | |||
vec4 total=vec4(0.0); | |||
vec2 p=gl_TexCoord[0].xy; | |||
float mask=2.0-p.x*(6.0-p.x*6.0)*p.y*(6.0-p.y*6.0); | |||
float b=radius.x+radius.y*mask; | |||
total+=texture2D(texture,vec2(p.x-b*4.0,p.y))*0.04; | |||
total+=texture2D(texture,vec2(p.x-b*3.0,p.y))*0.08; | |||
total+=texture2D(texture,vec2(p.x-b*2.0,p.y))*0.12; | |||
total+=texture2D(texture,vec2(p.x-b ,p.y))*0.16; | |||
total+=texture2D(texture,vec2(p.x ,p.y))*0.20; | |||
total+=texture2D(texture,vec2(p.x+b ,p.y))*0.16; | |||
total+=texture2D(texture,vec2(p.x+b*2.0,p.y))*0.12; | |||
total+=texture2D(texture,vec2(p.x+b*3.0,p.y))*0.08; | |||
total+=texture2D(texture,vec2(p.x+b*4.0,p.y))*0.04; | |||
gl_FragColor=total; | |||
} |
@@ -3,10 +3,10 @@ | |||
#version 120 | |||
void main() | |||
{ | |||
gl_Position=gl_Vertex; | |||
gl_TexCoord[0]=gl_MultiTexCoord0; | |||
} | |||
{ | |||
gl_Position=gl_Vertex; | |||
gl_TexCoord[0]=gl_MultiTexCoord0; | |||
} | |||
-- GLSL.Frag -- | |||
@@ -16,19 +16,19 @@ uniform sampler2D texture; | |||
uniform vec2 radius; | |||
void main(void) | |||
{ | |||
vec4 total=vec4(0.0); | |||
vec2 p=gl_TexCoord[0].xy; | |||
float mask=2.0-p.x*(6.0-p.x*6.0)*p.y*(6.0-p.y*6.0); | |||
float b=radius.x+radius.y*mask; | |||
total+=texture2D(texture,vec2(p.x,p.y-b*4.0))*0.04; | |||
total+=texture2D(texture,vec2(p.x,p.y-b*3.0))*0.08; | |||
total+=texture2D(texture,vec2(p.x,p.y-b*2.0))*0.12; | |||
total+=texture2D(texture,vec2(p.x,p.y-b ))*0.16; | |||
total+=texture2D(texture,vec2(p.x,p.y ))*0.20; | |||
total+=texture2D(texture,vec2(p.x,p.y+b ))*0.16; | |||
total+=texture2D(texture,vec2(p.x,p.y+b*2.0))*0.12; | |||
total+=texture2D(texture,vec2(p.x,p.y+b*3.0))*0.08; | |||
total+=texture2D(texture,vec2(p.x,p.y+b*4.0))*0.04; | |||
gl_FragColor=total; | |||
} | |||
{ | |||
vec4 total=vec4(0.0); | |||
vec2 p=gl_TexCoord[0].xy; | |||
float mask=2.0-p.x*(6.0-p.x*6.0)*p.y*(6.0-p.y*6.0); | |||
float b=radius.x+radius.y*mask; | |||
total+=texture2D(texture,vec2(p.x,p.y-b*4.0))*0.04; | |||
total+=texture2D(texture,vec2(p.x,p.y-b*3.0))*0.08; | |||
total+=texture2D(texture,vec2(p.x,p.y-b*2.0))*0.12; | |||
total+=texture2D(texture,vec2(p.x,p.y-b ))*0.16; | |||
total+=texture2D(texture,vec2(p.x,p.y ))*0.20; | |||
total+=texture2D(texture,vec2(p.x,p.y+b ))*0.16; | |||
total+=texture2D(texture,vec2(p.x,p.y+b*2.0))*0.12; | |||
total+=texture2D(texture,vec2(p.x,p.y+b*3.0))*0.08; | |||
total+=texture2D(texture,vec2(p.x,p.y+b*4.0))*0.04; | |||
gl_FragColor=total; | |||
} |
@@ -3,10 +3,10 @@ | |||
#version 120 | |||
void main() | |||
{ | |||
gl_Position=gl_Vertex; | |||
gl_TexCoord[0]=gl_MultiTexCoord0; | |||
} | |||
{ | |||
gl_Position=gl_Vertex; | |||
gl_TexCoord[0]=gl_MultiTexCoord0; | |||
} | |||
-- GLSL.Frag -- | |||
@@ -19,16 +19,16 @@ uniform vec3 color; | |||
uniform float flash; | |||
void main(void) | |||
{ | |||
vec2 p=gl_FragCoord.xy/screen_size.xy; | |||
vec3 c=texture2D(texture,p).xyz; | |||
float a=(c.x+c.y+c.z)/3.0; | |||
c=mix(c,vec3(a),color.z); // grayscale | |||
c*=filter; // filter | |||
c*=color.x; // brightness | |||
c=0.5+(c-0.5)*color.y; // contrast | |||
c+=flash; // flash | |||
gl_FragColor=vec4(c,1.0); | |||
} | |||
{ | |||
vec2 p=gl_FragCoord.xy/screen_size.xy; | |||
vec3 c=texture2D(texture,p).xyz; | |||
float a=(c.x+c.y+c.z)/3.0; | |||
c=mix(c,vec3(a),color.z); // grayscale | |||
c*=filter; // filter | |||
c*=color.x; // brightness | |||
c=0.5+(c-0.5)*color.y; // contrast | |||
c+=flash; // flash | |||
gl_FragColor=vec4(c,1.0); | |||
} |
@@ -3,10 +3,10 @@ | |||
#version 120 | |||
void main() | |||
{ | |||
gl_Position=gl_Vertex; | |||
gl_TexCoord[0]=gl_MultiTexCoord0; | |||
} | |||
{ | |||
gl_Position=gl_Vertex; | |||
gl_TexCoord[0]=gl_MultiTexCoord0; | |||
} | |||
-- GLSL.Frag -- | |||
@@ -18,20 +18,20 @@ uniform float time; | |||
uniform vec4 copper; | |||
void main(void) | |||
{ | |||
vec2 p=gl_TexCoord[0].xy; | |||
vec3 color=texture2D(texture,p).xyz; | |||
{ | |||
vec2 p=gl_TexCoord[0].xy; | |||
vec3 color=texture2D(texture,p).xyz; | |||
vec3 copper=vec3(0.5); | |||
vec3 copper=vec3(0.5); | |||
copper.x+=0.5*cos(p.y*float(screen_size.y/64)+time*2.0); | |||
copper.z+=0.5*sin(p.y*float(screen_size.y/64)+time*2.0); | |||
copper.x+=0.5*cos(p.y*float(screen_size.y/64)+time*2.0); | |||
copper.z+=0.5*sin(p.y*float(screen_size.y/64)+time*2.0); | |||
copper*=0.75+0.375*cos(p.y*float(screen_size.x/8)-time*2.0); | |||
copper*=0.75+0.375*cos(p.y*float(screen_size.x/8)-time*2.0); | |||
copper.x=float(int(copper.x*8.0)*32)/256.0; | |||
copper.y=float(int(copper.y*8.0)*32)/256.0; | |||
copper.z=float(int(copper.z*8.0)*32)/256.0; | |||
copper.x=float(int(copper.x*8.0)*32)/256.0; | |||
copper.y=float(int(copper.y*8.0)*32)/256.0; | |||
copper.z=float(int(copper.z*8.0)*32)/256.0; | |||
gl_FragColor=vec4((dot(color,color)==1.0)?copper:color,1.0); | |||
} | |||
gl_FragColor=vec4((dot(color,color)==1.0)?copper:color,1.0); | |||
} |
@@ -3,10 +3,10 @@ | |||
#version 120 | |||
void main() | |||
{ | |||
gl_Position=gl_Vertex; | |||
gl_TexCoord[0]=gl_MultiTexCoord0; | |||
} | |||
{ | |||
gl_Position=gl_Vertex; | |||
gl_TexCoord[0]=gl_MultiTexCoord0; | |||
} | |||
-- GLSL.Frag -- | |||
@@ -17,6 +17,6 @@ uniform sampler2D source; | |||
uniform vec2 mix; | |||
void main(void) | |||
{ | |||
gl_FragColor=texture2D(source,gl_TexCoord[0].xy)*mix.x+texture2D(glow,gl_TexCoord[0].xy)*mix.y; | |||
} | |||
{ | |||
gl_FragColor=texture2D(source,gl_TexCoord[0].xy)*mix.x+texture2D(glow,gl_TexCoord[0].xy)*mix.y; | |||
} |
@@ -3,10 +3,10 @@ | |||
#version 120 | |||
void main() | |||
{ | |||
gl_Position=gl_Vertex; | |||
gl_TexCoord[0]=gl_MultiTexCoord0; | |||
} | |||
{ | |||
gl_Position=gl_Vertex; | |||
gl_TexCoord[0]=gl_MultiTexCoord0; | |||
} | |||
-- GLSL.Frag -- | |||
@@ -20,20 +20,20 @@ uniform float noise; | |||
uniform vec3 retrace; | |||
float rand(in vec2 p,in float t,in float v) | |||
{ | |||
return fract(sin(dot(p+mod(t,2.0),vec2(12.9898,78.2333)))*v); | |||
} | |||
{ | |||
return fract(sin(dot(p+mod(t,2.0),vec2(12.9898,78.2333)))*v); | |||
} | |||
void main(void) | |||
{ | |||
vec2 p=gl_FragCoord.xy/screen_size.xy; | |||
float r1=rand(p,time,43758.5453); | |||
float r2=rand(p,time,70425.2854); | |||
vec2 o=(offset-offset*2.0*r1)/screen_size; | |||
vec3 c=texture2D(texture,p+o).xyz; // offset | |||
c*=1.0+(noise-noise*2.0*r1); // noise | |||
c-=retrace.x*0.01*mod(p.y*retrace.y+time*retrace.z,1.0); // retrace | |||
gl_FragColor=vec4(c,1.0); | |||
} | |||
{ | |||
vec2 p=gl_FragCoord.xy/screen_size.xy; | |||
float r1=rand(p,time,43758.5453); | |||
float r2=rand(p,time,70425.2854); | |||
vec2 o=(offset-offset*2.0*r1)/screen_size; | |||
vec3 c=texture2D(texture,p+o).xyz; // offset | |||
c*=1.0+(noise-noise*2.0*r1); // noise | |||
c-=retrace.x*0.01*mod(p.y*retrace.y+time*retrace.z,1.0); // retrace | |||
gl_FragColor=vec4(c,1.0); | |||
} |
@@ -3,10 +3,10 @@ | |||
#version 120 | |||
void main() | |||
{ | |||
gl_Position=gl_Vertex; | |||
gl_TexCoord[0]=gl_MultiTexCoord0; | |||
} | |||
{ | |||
gl_Position=gl_Vertex; | |||
gl_TexCoord[0]=gl_MultiTexCoord0; | |||
} | |||
-- GLSL.Frag -- | |||
@@ -28,47 +28,47 @@ uniform vec3 corner; | |||
uniform float sync; | |||
vec2 screen(in vec2 p,in float radius) | |||
{ | |||
float d=deform.x+sync*0.0625; | |||
return p*(1.5-(radius*cos(p.x*d)+radius*cos(p.y*d)))-0.5; | |||
} | |||
{ | |||
float d=deform.x+sync*0.0625; | |||
return p*(1.5-(radius*cos(p.x*d)+radius*cos(p.y*d)))-0.5; | |||
} | |||
vec3 get_color(in sampler2D tex,in vec2 p) | |||
{ | |||
return texture2D(tex,clamp(p,-1.0,0.0)).xyz; | |||
} | |||
{ | |||
return texture2D(tex,clamp(p,-1.0,0.0)).xyz; | |||
} | |||
float letterbox(in vec2 p,in float w,in float radius,in float smooth) | |||
{ | |||
return 1.0-smoothstep(smooth,1.0,length(max(abs(p*w+w/2.0)-vec2(radius),0.0))+radius); | |||
} | |||
{ | |||
return 1.0-smoothstep(smooth,1.0,length(max(abs(p*w+w/2.0)-vec2(radius),0.0))+radius); | |||
} | |||
void main(void) | |||
{ | |||
vec2 q=gl_FragCoord.xy/screen_size.xy; | |||
vec2 p=-1.0+2.0*gl_FragCoord.xy/screen_size.xy; | |||
p.y+=0.025*sync; | |||
vec2 z=screen(p,deform.y); | |||
vec2 z1=screen(p,deform.y+ghost1.z*0.01); | |||
vec2 z2=screen(p,deform.y+ghost2.z*0.01); | |||
float mask=q.x*(6.0-q.x*6.0)*q.y*(6.0-q.y*6.0); | |||
{ | |||
vec2 q=gl_FragCoord.xy/screen_size.xy; | |||
vec2 p=-1.0+2.0*gl_FragCoord.xy/screen_size.xy; | |||
p.y+=0.025*sync; | |||
vec2 z=screen(p,deform.y); | |||
vec2 z1=screen(p,deform.y+ghost1.z*0.01); | |||
vec2 z2=screen(p,deform.y+ghost2.z*0.01); | |||
float mask=q.x*(6.0-q.x*6.0)*q.y*(6.0-q.y*6.0); | |||
vec3 source=get_color(texture,z); | |||
vec3 g1=get_color(texture,z1-ghost1.xy); | |||
vec3 g2=get_color(texture,z2-ghost2.xy); | |||
vec3 source=get_color(texture,z); | |||
vec3 g1=get_color(texture,z1-ghost1.xy); | |||
vec3 g2=get_color(texture,z2-ghost2.xy); | |||
vec3 c=source+g1*ghost1.w+g2*ghost2.w; // mix | |||
vec3 c=source+g1*ghost1.w+g2*ghost2.w; // mix | |||
float v=aberration/float(screen_size.x)+aberration/float(screen_size.x)*(2.0-mask); | |||
vec3 ca1=get_color(texture,vec2(z.x-v,z.y)); | |||
vec3 ca2=get_color(texture,vec2(z.x+v,z.y)); | |||
c+=vec3(ca1.x,c.y,ca2.z); // chromatic aberration | |||
float v=aberration/float(screen_size.x)+aberration/float(screen_size.x)*(2.0-mask); | |||
vec3 ca1=get_color(texture,vec2(z.x-v,z.y)); | |||
vec3 ca2=get_color(texture,vec2(z.x+v,z.y)); | |||
c+=vec3(ca1.x,c.y,ca2.z); // chromatic aberration | |||
c*=moire_h.x+moire_h.y*sin(z.y*float(screen_size.y*moire_h.z))*sin(0.5+z.x*float(screen_size.x*moire_h.w)); // moire h | |||
c*=moire_v.x+moire_v.y*sin(z.x*float(screen_size.x*moire_v.z))*sin(0.5+z.y*float(screen_size.y*moire_v.w)); // moire v | |||
c*=scanline_h.x+scanline_h.y*cos(z.y*float(screen_size.y*scanline_h.z+scanline_h.w)); // scanline h | |||
c*=scanline_v.x+scanline_v.y*cos(z.x*float(screen_size.x*scanline_v.z+scanline_v.w)); // scanline v | |||
c*=(mask-vignetting); // vignetting | |||
c*=letterbox(z,corner.x+2.0,corner.y,corner.z); // corner | |||
gl_FragColor=vec4(c,1.0); | |||
} | |||
c*=moire_h.x+moire_h.y*sin(z.y*float(screen_size.y*moire_h.z))*sin(0.5+z.x*float(screen_size.x*moire_h.w)); // moire h | |||
c*=moire_v.x+moire_v.y*sin(z.x*float(screen_size.x*moire_v.z))*sin(0.5+z.y*float(screen_size.y*moire_v.w)); // moire v | |||
c*=scanline_h.x+scanline_h.y*cos(z.y*float(screen_size.y*scanline_h.z+scanline_h.w)); // scanline h | |||
c*=scanline_v.x+scanline_v.y*cos(z.x*float(screen_size.x*scanline_v.z+scanline_v.w)); // scanline v | |||
c*=(mask-vignetting); // vignetting | |||
c*=letterbox(z,corner.x+2.0,corner.y,corner.z); // corner | |||
gl_FragColor=vec4(c,1.0); | |||
} |
@@ -3,10 +3,10 @@ | |||
#version 120 | |||
void main() | |||
{ | |||
gl_Position=gl_Vertex; | |||
gl_TexCoord[0]=gl_MultiTexCoord0; | |||
} | |||
{ | |||
gl_Position=gl_Vertex; | |||
gl_TexCoord[0]=gl_MultiTexCoord0; | |||
} | |||
-- GLSL.Frag -- | |||
@@ -17,6 +17,6 @@ uniform sampler2D buffer; | |||
uniform vec2 mix; | |||
void main(void) | |||
{ | |||
gl_FragColor=texture2D(source,gl_TexCoord[0].xy)*mix.x+texture2D(buffer,gl_TexCoord[0].xy)*mix.y; | |||
} | |||
{ | |||
gl_FragColor=texture2D(source,gl_TexCoord[0].xy)*mix.x+texture2D(buffer,gl_TexCoord[0].xy)*mix.y; | |||
} |
@@ -3,10 +3,10 @@ | |||
#version 120 | |||
void main() | |||
{ | |||
gl_Position = gl_Vertex; | |||
gl_TexCoord[0] = gl_MultiTexCoord0; | |||
} | |||
{ | |||
gl_Position = gl_Vertex; | |||
gl_TexCoord[0] = gl_MultiTexCoord0; | |||
} | |||
-- GLSL.Frag -- | |||
@@ -15,6 +15,6 @@ void main() | |||
uniform sampler2D texture; | |||
void main(void) | |||
{ | |||
gl_FragColor = texture2D(texture, gl_TexCoord[0].xy); | |||
} | |||
{ | |||
gl_FragColor = texture2D(texture, gl_TexCoord[0].xy); | |||
} |