Changeset 1707


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

setup menu bugfix (working now!)

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

Legend:

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

    r1706 r1707  
    171171float value, angle, radius, scale, speed;
    172172/* shader variable */
    173 vec2 buffer(0.8f,0.2f);         // [new frame mix,old frame mix]
    174 vec2 remanency(0.2f,0.8f);      // remanency [source mix,buffer mix]
     173vec2 buffer(0.7f,0.3f);         // [new frame mix,old frame mix]
     174vec2 remanency(0.3f,0.7f);      // remanency [source mix,buffer mix]
    175175vec2 glow_mix(0.5f,0.5f);       // glow mix [source mix,glow mix]
    176176vec2 glow_large(2.0f,2.0f);     // large glow radius [center,corner]
     
    207207        vec4(0.0f, 1.0f, 0.1f, glow_mix.x),
    208208        vec4(0.0f, 1.0f, 0.1f, glow_mix.y),
    209         vec4(0.0f, 8.0f, 0.1f, glow_large.x),
    210         vec4(0.0f, 8.0f, 0.1f, glow_large.y),
    211         vec4(0.0f, 4.0f, 0.1f, glow_small.x),
    212         vec4(0.0f, 4.0f, 0.1f, glow_small.y),
     209        vec4(0.0f, 4.0f, 0.05f, glow_large.x),
     210        vec4(0.0f, 4.0f, 0.05f, glow_large.y),
     211        vec4(0.0f, 2.0f, 0.05f, glow_small.x),
     212        vec4(0.0f, 2.0f, 0.05f, glow_small.y),
     213        vec4(0),
    213214    vec4(0), /* blur */
    214215        vec4(0, 1, 1, 0),
    215         vec4(0.0f, 2.0f, 0.1f, blur.x),
    216         vec4(0.0f, 2.0f, 0.1f, blur.y),
     216        vec4(0.0f, 2.0f, 0.05f, blur.x),
     217        vec4(0.0f, 2.0f, 0.05f, blur.y),
    217218    vec4(0) /* color */
    218219    };
    219220
    220 void Render::UpdateVar(int key)
    221 {
    222     int k = key;
    223     m_shader_remanency = (setup_var[k].w == 1) ? true : false; k += 8;
    224     m_shader_glow = (setup_var[k].w == 1) ? true : false;
     221void Render::UpdateVar()
     222{
     223    int k = 1;
     224    m_shader_remanency = (setup_var[k].w == 1) ? true : false; k++;
     225    buffer = vec2(setup_var[k].w, setup_var[k + 1].w); k += 2;
     226    remanency = vec2(setup_var[k].w, setup_var[k + 1].w); k += 2;
     227    k += 4;
     228    m_shader_glow = (setup_var[k].w == 1) ? true : false; k++;
     229    glow_mix = vec2(setup_var[k].w, setup_var[k + 1].w); k += 2;
     230    glow_large = vec2(setup_var[k].w, setup_var[k + 1].w); k += 2;
     231    glow_small = vec2(setup_var[k].w, setup_var[k + 1].w); k += 2;
     232    k += 2;
     233    m_shader_blur = (setup_var[k].w == 1) ? true : false; k++;
     234    blur = vec2(setup_var[k].w, setup_var[k + 1].w); k += 2;
     235    k += 6;
    225236}
    226237
     
    491502            setup_var[setup_item_key].w -= setup_var[setup_item_key].z;
    492503            if (setup_var[setup_item_key].w < setup_var[setup_item_key].x) setup_var[setup_item_key].w = setup_var[setup_item_key].x;
    493             Render::UpdateVar(setup_item_key);
     504            Render::UpdateVar();
    494505        }
    495506        timer_key = timer;
     
    501512            setup_var[setup_item_key].w += setup_var[setup_item_key].z;
    502513            if (setup_var[setup_item_key].w > setup_var[setup_item_key].y) setup_var[setup_item_key].w = setup_var[setup_item_key].y;
    503             Render::UpdateVar(setup_item_key);
     514            Render::UpdateVar();
    504515        }
    505516        timer_key = timer;
  • trunk/tools/neercs/video/render.h

    r1706 r1707  
    2626    void Pause();
    2727    void Shader();
    28     void UpdateVar(int key);
     28    void UpdateVar();
    2929
    3030    caca_canvas_t *m_caca;
Note: See TracChangeset for help on using the changeset viewer.