Ignore:
Timestamp:
Sep 17, 2012, 1:44:47 AM (8 years ago)
Author:
rez
Message:

NEERCS: added copper in setup (not working yet)

File:
1 edited

Legend:

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

    r1905 r1922  
    2121    {
    2222    vec2 p=gl_TexCoord[0].xy;
    23     vec3 color=texture2D(texture,p).xyz;
     23    vec3 source=texture2D(texture,p).xyz;
    2424
    25     vec3 copper=vec3(0.5);
     25    vec3 color=vec3(0.5);
    2626
    27     copper.x+=0.5*cos(p.y*float(screen_size.y/64)+time*2.0);
    28     copper.z+=0.5*sin(p.y*float(screen_size.y/64)+time*2.0);
     27    color.x+=0.5*cos(p.y*float(screen_size.y/copper.z)+time*2.0);
     28    color.z+=0.5*sin(p.y*float(screen_size.y/copper.z)+time*2.0);
    2929
    30     copper*=0.75+0.375*cos(p.y*float(screen_size.x/8)-time*2.0);
     30    color*=copper.x+copper.y*cos(p.y*float(screen_size.x/copper.w)-time*2.0);
    3131
    32     copper.x=float(int(copper.x*8.0)*32)/256.0;
    33     copper.y=float(int(copper.y*8.0)*32)/256.0;
    34     copper.z=float(int(copper.z*8.0)*32)/256.0;
     32    color.x=float(int(color.x*8.0)*32)/256.0;
     33    color.y=float(int(color.y*8.0)*32)/256.0;
     34    color.z=float(int(color.z*8.0)*32)/256.0;
    3535
    36     gl_FragColor=vec4((dot(color,color)==1.0)?copper:color,1.0);
     36    gl_FragColor=vec4((color==1.0)?color:source,1.0);
    3737    }
Note: See TracChangeset for help on using the changeset viewer.