Ignore:
Timestamp:
Aug 30, 2012, 1:41:59 AM (8 years ago)
Author:
rez
Message:

COPPERBARS FUCK YEAH

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/neercs/video/color.lolfx

    r1829 r1836  
    1515uniform sampler2D texture;
    1616uniform vec2 screen_size;
    17 uniform float time;
    1817uniform vec3 filter;
    1918uniform vec3 color;
     
    2423        vec2 p=gl_FragCoord.xy/screen_size.xy;
    2524        vec3 c=texture2D(texture,p).xyz;
    26         vec3 o=c;
    27 
    28         float sinus=0.125+0.125*sin(p.x*float(screen_size.x/32)+time)+0.125*cos(p.y*float(screen_size.x/32)+time);
    29         vec3 copper=vec3(0.5+sinus);
    30         copper.x+=0.5*cos(p.y*float(screen_size.y/64)+time);
    31         copper.z+=0.5*sin(p.y*float(screen_size.y/64)+time);
    32         copper*=0.5+0.25*cos(p.y*float(screen_size.x/6)-time*2.0);
    33 
    34         copper.x=float(int(copper.x*8.0)*32)/256.0;
    35         copper.y=float(int(copper.y*8.0)*32)/256.0;
    36         copper.z=float(int(copper.z*8.0)*32)/256.0;
    3725
    3826        float a=(c.x+c.y+c.z)/3.0;
     
    4331        c+=flash;                                                                                               // flash
    4432
    45         //gl_FragColor=vec4(c,1.0);
    46         gl_FragColor=vec4((o.x>0.5&&o.y>0.5&&o.z>0.5)?copper:c,1.0);
     33        gl_FragColor=vec4(c,1.0);
    4734        }
Note: See TracChangeset for help on using the changeset viewer.