Changeset 1620


Ignore:
Timestamp:
Jul 10, 2012, 2:25:36 PM (8 years ago)
Author:
rez
Message:

updated logo + optimized postfx

Location:
trunk/tools/neercs
Files:
2 edited

Legend:

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

    r1618 r1620  
    113113    caca_draw_thin_line(m_caca, x3, y3, x1, y1);
    114114
    115     int logo_x = -1;
     115    int logo_x = 1;
    116116    int logo_y = h / 2 - 3;
    117117
     118/*
     119 ___  __ ______ ______ ______  ______ ______
     120 \  \|  /  ____Y  ____Y  __  \/  ___//  ___/
     121 /   `  >  ____>  ____>  ,_  <  <____\___  \
     122/__/\___\______\______\__| \__\_____________\
     123*/
     124
    118125    caca_set_color_argb(m_caca, hex_color(0.5f + 0.25f * lol::cos(m_time * 3               ),0.5f,0.5f + 0.25f * lol::sin(m_time * 3               )), bg_color);
    119     caca_put_str(m_caca, logo_x, logo_y    ," ___  __ _______ _______ _______  ._____ _______. ");
     126    caca_put_str(m_caca, logo_x, logo_y    ," ___  __ ______ ______ ______  ______ ______");
    120127    caca_set_color_argb(m_caca, hex_color(0.5f + 0.25f * 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);
    121     caca_put_str(m_caca, logo_x, logo_y + 1, "|   \\|  Y   ____Y   ____Y  ___  \\/  .___Y   ___/  ");
     128    caca_put_str(m_caca, logo_x, logo_y + 1, " \\  \\|  /  ____Y  ____Y  __  \\/  ___//  ___/");
    122129    caca_set_color_argb(m_caca, hex_color(0.5f + 0.25f * 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);
    123     caca_put_str(m_caca, logo_x, logo_y + 2, "|  . °  >   ____>   ____>  .__  /  <_____\\____  \\ ");
     130    caca_put_str(m_caca, logo_x, logo_y + 2, " /   `  >  ____>  ____>  ,_  <  <____\\___  \\");
    124131    caca_set_color_argb(m_caca, hex_color(0.5f + 0.25f * 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);
    125     caca_put_str(m_caca, logo_x, logo_y + 3, "|__|\\___\\_______\\_______\\__|  \\_\\________________\\");
     132    caca_put_str(m_caca, logo_x, logo_y + 3, "/__/\\___\\______\\______\\__| \\__\\_____________\\");
    126133    caca_set_color_argb(m_caca, 0xdef, bg_color);
    127     caca_put_str(m_caca, logo_x + 7, logo_y + 5, "ALL YOUR TERMINALS ARE BELONG TO US!");
     134    caca_put_str(m_caca, logo_x + 5, logo_y + 5, "ALL YOUR TERMINALS ARE BELONG TO US");
    128135
    129136    caca_set_color_ansi(m_caca, 0x666, bg_color);
  • trunk/tools/neercs/video/postfx.lolfx

    r1618 r1620  
    3333vec3 get_color(in sampler2D tex,in vec2 p)
    3434        {
    35         return (p.x<-1.0||p.x>0.0||p.y<-1.0||p.y>0.0)?vec3(0.0,0.0,0.0):texture2D(tex,p).xyz;
     35        //return (p.x<-1.0||p.x>0.0||p.y<-1.0||p.y>0.0)?vec3(0.0,0.0,0.0):texture2D(tex,p).xyz;
     36        return texture2D(tex,clamp(p,-1.0,0.0)).xyz;
    3637        }
    3738
     
    4142        }
    4243
    43 float round_square(in vec2 p,in vec2 b,in float r)
     44float round_square(in vec2 rect,in float r)
    4445        {
     46        vec2 b=rect-vec2(r);
     47        vec2 p=vec2(gl_TexCoord[0].xy-screen_size.xy*0.5);
    4548        return length(max(abs(p)-b,0.0))-r;
    4649        }
    4750
    48 vec3 letterbox(in vec2 p,in vec3 c)
     51vec3 letterbox(in vec3 c)
    4952        {
    50         vec2 b=screen_size*0.3625;
    51         float r=screen_size.x*0.2;
    52         float f=round_square(p,b,r);
    53         return c*clamp(1.0-f,0.0,1.0);
     53        vec2 rect=screen_size*0.49;
     54        float r=screen_size.x*0.1;
     55        float f=1.0-clamp(round_square(rect,r),0.0,1.0);
     56        return c*f;
    5457        }
    5558
     
    100103        color=vec3(color.x*0.875,color.y*1.0,color.z*0.625);
    101104        color*=q.x*(6.0-q.x*6.0)*q.y*(6.0-q.y*6.0);                                                                     // vignetting
    102         color=letterbox(p,color);                                                                                                       // letterbox
     105        //color=vec3(1.0,1.0,1.0);
     106        //color=letterbox(color);                                                                                                               // letterbox
    103107        gl_FragColor=vec4(color,1.0);
    104108        }
Note: See TracChangeset for help on using the changeset viewer.