Changeset 1829


Ignore:
Timestamp:
Aug 28, 2012, 2:01:51 AM (7 years ago)
Author:
rez
Message:

added COPPER \:D/ (still buggy btw)

Location:
trunk/tools/neercs
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/neercs/neercs.cpp

    r1701 r1829  
    114114    int logo_y = h / 2 - 2;
    115115
    116     caca_set_color_argb(m_caca, hex_color(0.5f + 0.5f * lol::cos(m_time * 3               ), 0.5f, 0.5f + 0.25f * lol::sin(m_time * 3               )), bg_color);
     116    caca_set_color_argb(m_caca, 0xfff, bg_color);
     117    //caca_set_color_argb(m_caca, hex_color(0.5f + 0.5f * lol::cos(m_time * 3               ), 0.5f, 0.5f + 0.25f * lol::sin(m_time * 3               )), bg_color);
    117118    caca_put_str(m_caca, logo_x + 3, logo_y    ,"__  _________ ______ ______ ______ ______");
    118     caca_set_color_argb(m_caca, hex_color(0.5f + 0.5f * lol::cos(m_time * 3 + M_PI / 4 * 1), 0.5f, 0.5f + 0.25f * lol::sin(m_time * 3 + M_PI / 4 * 1)), bg_color);
     119    //caca_set_color_argb(m_caca, hex_color(0.5f + 0.5f * lol::cos(m_time * 3 + M_PI / 4 * 1), 0.5f, 0.5f + 0.25f * lol::sin(m_time * 3 + M_PI / 4 * 1)), bg_color);
    119120    caca_put_str(m_caca, logo_x + 2, logo_y + 1, "/  \\/  /  __  >  __  >  __  >  ___//  ___/ \x0a9");
    120     caca_set_color_argb(m_caca, hex_color(0.5f + 0.5f * lol::cos(m_time * 3 + M_PI / 4 * 2), 0.5f, 0.5f + 0.25f * lol::sin(m_time * 3 + M_PI / 4 * 2)), bg_color);
     121    //caca_set_color_argb(m_caca, hex_color(0.5f + 0.5f * lol::cos(m_time * 3 + M_PI / 4 * 2), 0.5f, 0.5f + 0.25f * lol::sin(m_time * 3 + M_PI / 4 * 2)), bg_color);
    121122    caca_put_str(m_caca, logo_x + 1, logo_y + 2, "/      /  ____/  ____/  __  <  <____\\___  \\");
    122     caca_set_color_argb(m_caca, hex_color(0.5f + 0.5f * lol::cos(m_time * 3 + M_PI / 4 * 3), 0.5f, 0.5f + 0.25f * lol::sin(m_time * 3 + M_PI / 4 * 3)), bg_color);
     123    //caca_set_color_argb(m_caca, hex_color(0.5f + 0.5f * lol::cos(m_time * 3 + M_PI / 4 * 3), 0.5f, 0.5f + 0.25f * lol::sin(m_time * 3 + M_PI / 4 * 3)), bg_color);
    123124    caca_put_str(m_caca, logo_x    , logo_y + 3, "/__/\\__/\\_______________/  \\________________\\");
    124125    caca_set_color_argb(m_caca, 0xdef, bg_color);
  • trunk/tools/neercs/video/color.lolfx

    r1820 r1829  
    1515uniform sampler2D texture;
    1616uniform vec2 screen_size;
     17uniform float time;
    1718uniform vec3 filter;
    1819uniform vec3 color;
     
    2324        vec2 p=gl_FragCoord.xy/screen_size.xy;
    2425        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;
    2537
    2638        float a=(c.x+c.y+c.z)/3.0;
     
    3143        c+=flash;                                                                                               // flash
    3244
    33         gl_FragColor=vec4(c,1.0);
     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);
    3447        }
  • trunk/tools/neercs/video/postfx.lolfx

    r1820 r1829  
    5858        vec3 g2=get_color(texture,z2-ghost2.xy);
    5959
    60         vec3 c=source+g1*g1*ghost1.w+g2*g2*ghost2.w;                    // mix
     60        vec3 c=source+g1*ghost1.w+g2*ghost2.w;                                  // mix
    6161
    6262        float v=aberration/float(screen_size.x)+aberration/float(screen_size.x)*(2.0-mask);
  • trunk/tools/neercs/video/render.cpp

    r1828 r1829  
    9393vec2 glow_small(1.0f,1.0f);     // small glow radius [center,corner]
    9494vec2 blur(0.5f,0.5f);           // blur radius [center,corner]
    95 vec3 color_filter(0.9f,1.0f,0.7f);    // color filter [red,green,blue]
    96 vec3 color_color(1.1f,1.1f,0.25f);    // color modifier [brightness,contrast,grayscale]
     95vec3 color_filter(0.9f,0.9f,1.0f);    // color filter [red,green,blue]
     96vec3 color_color(1.2f,1.1f,0.25f);    // color modifier [brightness,contrast,grayscale]
    9797vec2 noise_offset(2.0f,2.0f);         // random line [horizontal,vertical]
    9898float noise_noise = 0.25f;            // noise
     
    101101float postfx_vignetting = -0.5f;      // vignetting strength
    102102float postfx_aberration = 4.0f;       // chromatic aberration
    103 vec4 postfx_ghost1(0.01f,0.0f,0.1f,-0.4f);      // ghost picture 1 [position x,position y,position z,strength]
    104 vec4 postfx_ghost2(0.02f,0.0f,0.1f,0.4f);       // ghost picture 2 [position x,position y,position z,strength]
     103vec4 postfx_ghost1(0.01f,0.0f,0.1f,-0.25f);     // ghost picture 1 [position x,position y,position z,strength]
     104vec4 postfx_ghost2(0.02f,0.0f,0.1f,0.25f);      // ghost picture 2 [position x,position y,position z,strength]
    105105vec4 postfx_moire_h(0.75f,-0.25f,0.0f,1.0f);    // vertical moire [base,variable,repeat x,repeat y]
    106106vec4 postfx_moire_v(0.75f,-0.25f,1.0f,1.5f);    // horizontal moire [base,variable,repeat x,repeat y]
     
    382382ShaderUniform shader_color_texture,
    383383              shader_color_screen_size,
     384              shader_color_time,
    384385              shader_color_filter,
    385386              shader_color_color,
     
    476477    shader_color_texture = shader_color->GetUniformLocation("texture");
    477478    shader_color_screen_size = shader_color->GetUniformLocation("screen_size");
     479    shader_color_time = shader_color->GetUniformLocation("time");
    478480    shader_color_filter = shader_color->GetUniformLocation("filter");
    479481    shader_color_color = shader_color->GetUniformLocation("color");
     
    951953        shader_color->SetUniform(shader_color_texture, fbo_front->GetTexture(), 0);
    952954        shader_color->SetUniform(shader_color_screen_size, (vec2)screen_size);
     955        shader_color->SetUniform(shader_color_time, fx_angle);
    953956        shader_color->SetUniform(shader_color_filter, color_filter);
    954957        shader_color->SetUniform(shader_color_color, color_color);
Note: See TracChangeset for help on using the changeset viewer.