Changeset 1783


Ignore:
Timestamp:
Aug 21, 2012, 1:35:57 AM (7 years ago)
Author:
rez
Message:

fixed menu variable bar

Location:
trunk/tools/neercs/video
Files:
2 edited

Legend:

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

    r1736 r1783  
    6161        p.y+=0.025*sync;
    6262        vec2 z =screen(p,deform.y);
    63         vec2 z1=screen(p,deform.y-ghost.x*0.1);
    64         vec2 z2=screen(p,deform.y+ghost.z*0.1);
     63        vec2 z1=screen(p,deform.y+ghost.x*0.01);
     64        vec2 z2=screen(p,deform.y+ghost.z*0.01);
    6565        float mask=q.x*(6.0-q.x*6.0)*q.y*(6.0-q.y*6.0);
    6666
     
    6969        vec2 o=(offset-offset*2.0*rnd.x)/screen_size;                   // offset
    7070        vec3 source=get_color(texture,z+o);                                             // offset added to source
    71         vec3 glass1=get_color(texture,z1);
    72         vec3 glass2=get_color(texture,z2);
     71        vec3 glass1=get_color(texture,z1-vec2(0.25,0.0));
     72        vec3 glass2=get_color(texture,z2-vec2(0.25,0.0));
    7373
    7474        float v=aberration/float(screen_size.x)+aberration/float(screen_size.x)*(2.0-mask);
  • trunk/tools/neercs/video/render.cpp

    r1773 r1783  
    102102float postfx_noise = 0.15f;     // noise
    103103float postfx_aberration = 3.0f; // chromatic aberration
    104 vec4 postfx_ghost(0.1f,0.25f,0.1f,0.5f);        // ghost picture [distance,strength,distance,strength]
     104vec4 postfx_ghost(0.1f,-0.25f,0.1f,0.5f);        // ghost picture [distance,strength,distance,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]
     
    284284        vec4(0),
    285285    vec4(0), /* ghost */
    286         vec4(0.0f, 0.2f, 0.01f, postfx_ghost.x),
    287         vec4(0.0f, 1.0f, 0.05f, postfx_ghost.y),
    288         vec4(0.0f, 0.2f, 0.01f, postfx_ghost.z),
    289         vec4(0.0f, 1.0f, 0.05f, postfx_ghost.w),
     286        vec4(0.0f, 2.0f, 0.1f, postfx_ghost.x),
     287        vec4(-1.0f, 1.0f, 0.1f, postfx_ghost.y),
     288        vec4(0.0f, 2.0f, 0.1f, postfx_ghost.z),
     289        vec4(-1.0f, 1.0f, 0.1f, postfx_ghost.w),
    290290        vec4(0),
    291291        vec4(0),
     
    297297        vec4(0.0f, 4.0f, 0.5f, postfx_moire_h.z),
    298298        vec4(0.0f, 4.0f, 0.5f, postfx_moire_h.w),
    299         vec4(0.5f, 1.0f, 0.1f, postfx_moire_v.x),
    300         vec4(-0.5f, 0.5f, 0.1f, postfx_moire_v.y),
     299        vec4(0.5f, 1.0f, 0.05f, postfx_moire_v.x),
     300        vec4(-0.5f, 0.5f, 0.05f, postfx_moire_v.y),
    301301        vec4(0.0f, 4.0f, 0.5f, postfx_moire_v.z),
    302302        vec4(0.0f, 4.0f, 0.5f, postfx_moire_v.w),
     
    306306        vec4(0.0f, 4.0f, 0.5f, postfx_scanline_h.z),
    307307        vec4(0.0f, 4.0f, 0.5f, postfx_scanline_h.w),
    308         vec4(0.5f, 1.0f, 0.1f, postfx_scanline_v.x),
    309         vec4(-0.5f, 0.5f, 0.1f, postfx_scanline_v.y),
     308        vec4(0.5f, 1.0f, 0.05f, postfx_scanline_v.x),
     309        vec4(-0.5f, 0.5f, 0.05f, postfx_scanline_v.y),
    310310        vec4(0.0f, 4.0f, 0.5f, postfx_scanline_v.z),
    311311        vec4(0.0f, 4.0f, 0.5f, postfx_scanline_v.w),
     
    357357    {
    358358        int k = !setup_switch ? (i * (setup_item_n + 1)) : (setup_option * (setup_item_n + 1) + 1 + i);
    359         if (setup_text[k] == "") return i;
     359        if (setup_text[k] == "") return i - 1;
    360360    }
    361361    return n - 1;
     
    787787        if (setup_switch)
    788788        {
     789            int x = setup_p.x + 1;
    789790            int w = setup_size.x - 3 - 4;
    790             int bar_w = (w / (setup_var[setup_item_key].y - setup_var[setup_item_key].x) * setup_var[setup_item_key].w);
     791            int bar_w = w / (setup_var[setup_item_key].y - setup_var[setup_item_key].x);
     792            int bar_x = bar_w * setup_var[setup_item_key].x;
    791793            if ((setup_var[setup_item_key].y - setup_var[setup_item_key].x) / setup_var[setup_item_key].z > 2)
    792794            {
    793795                caca_printf(m_caca, setup_p.x + setup_size.x - 4, y, "%4.2f", setup_var[setup_item_key].w);
    794                 caca_draw_line(m_caca, setup_p.x + 1, y, setup_p.x + 1 + w, y,'.');
    795                 if(setup_var[setup_item_key].w > setup_var[setup_item_key].x) caca_draw_line(m_caca, setup_p.x + 1, y, setup_p.x + 1 + bar_w, y,'x');
     796                caca_draw_line(m_caca, x, y, x - bar_x + bar_w * setup_var[setup_item_key].y, y,'.');
     797                if(setup_var[setup_item_key].w != setup_var[setup_item_key].x) caca_draw_line(m_caca, x, y, x - bar_x + bar_w * setup_var[setup_item_key].w, y,'x');
    796798            }
    797799            else
Note: See TracChangeset for help on using the changeset viewer.