diff --git a/neercs/video/blurh.lolfx b/neercs/video/blurh.lolfx index 290f0f6..221207f 100644 --- a/neercs/video/blurh.lolfx +++ b/neercs/video/blurh.lolfx @@ -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; - } \ No newline at end of file + { + 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; + } \ No newline at end of file diff --git a/neercs/video/blurv.lolfx b/neercs/video/blurv.lolfx index 34f2f11..6605e2c 100644 --- a/neercs/video/blurv.lolfx +++ b/neercs/video/blurv.lolfx @@ -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; - } \ No newline at end of file + { + 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; + } \ No newline at end of file diff --git a/neercs/video/color.lolfx b/neercs/video/color.lolfx index a633759..3bda681 100644 --- a/neercs/video/color.lolfx +++ b/neercs/video/color.lolfx @@ -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); - } \ No newline at end of file + { + 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); + } \ No newline at end of file diff --git a/neercs/video/copper.lolfx b/neercs/video/copper.lolfx index 0074924..c6c02a8 100644 --- a/neercs/video/copper.lolfx +++ b/neercs/video/copper.lolfx @@ -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); + } diff --git a/neercs/video/glow.lolfx b/neercs/video/glow.lolfx index 4af0df7..6bcd1b3 100644 --- a/neercs/video/glow.lolfx +++ b/neercs/video/glow.lolfx @@ -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; - } \ No newline at end of file + { + gl_FragColor=texture2D(source,gl_TexCoord[0].xy)*mix.x+texture2D(glow,gl_TexCoord[0].xy)*mix.y; + } \ No newline at end of file diff --git a/neercs/video/noise.lolfx b/neercs/video/noise.lolfx index 6fd87ec..5d8d1b3 100644 --- a/neercs/video/noise.lolfx +++ b/neercs/video/noise.lolfx @@ -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); - } \ No newline at end of file + { + 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); + } \ No newline at end of file diff --git a/neercs/video/postfx.lolfx b/neercs/video/postfx.lolfx index f7f6842..17a46a3 100644 --- a/neercs/video/postfx.lolfx +++ b/neercs/video/postfx.lolfx @@ -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); - } \ No newline at end of file + 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); + } \ No newline at end of file diff --git a/neercs/video/remanency.lolfx b/neercs/video/remanency.lolfx index 944f23f..53c170a 100644 --- a/neercs/video/remanency.lolfx +++ b/neercs/video/remanency.lolfx @@ -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; - } \ No newline at end of file + { + gl_FragColor=texture2D(source,gl_TexCoord[0].xy)*mix.x+texture2D(buffer,gl_TexCoord[0].xy)*mix.y; + } \ No newline at end of file diff --git a/neercs/video/simple.lolfx b/neercs/video/simple.lolfx index c0a7e4e..d1561e3 100644 --- a/neercs/video/simple.lolfx +++ b/neercs/video/simple.lolfx @@ -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); - } \ No newline at end of file + { + gl_FragColor = texture2D(texture, gl_TexCoord[0].xy); + } \ No newline at end of file