Changeset 2182


Ignore:
Timestamp:
Dec 27, 2012, 2:54:20 AM (7 years ago)
Author:
rez
Message:

NEERCS: fixed color matching for copper

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

Legend:

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

    r2177 r2182  
    3939    color.z = float(int(color.z * 8.0) * 32) / 256.0;
    4040
    41     gl_FragColor = vec4((source == mask_color) ? color : source, 1.0);
     41gl_FragColor = vec4((abs(source.x - mask_color.x) < 0.025 && abs(source.y - mask_color.y) < 0.025 && abs(source.z - mask_color.z) < 0.025) ? color : source, 1.0);
    4242}
  • trunk/tools/neercs/video/render.cpp

    r2177 r2182  
    342342    vec4(0.0f, 1.0f, 0.02f, 0), // copper_copper.z
    343343    vec4(1.0f, 8.0f, 0.25f, 0), // copper_copper.w
    344     vec4(0.0f, 4.0f, 0.25f, 0), // copper_mask_color.x
    345     vec4(0.0f, 4.0f, 0.25f, 0), // copper_mask_color.y
    346     vec4(0.0f, 4.0f, 0.25f, 0), // copper_mask_color.z
     344    vec4(0.0f, 1.0f, 0.05f, 0), // copper_mask_color.x
     345    vec4(0.0f, 1.0f, 0.05f, 0), // copper_mask_color.y
     346    vec4(0.0f, 1.0f, 0.05f, 0), // copper_mask_color.z
    347347    vec4(0),
    348348vec4(0), /* color */
     
    4554550,
    456456    0.75f,0.25f,0.42f,4.0f,   // copper_copper
    457     0.0f,4.0f,0.0f,           // copper_mask_color
     457    0.05f,1.0f,0.0f,          // copper_mask_color
    458458    0,
    4594590,
     
    5125120,
    513513    0.75f,0.25f,0.42f,4.0f,   // copper_copper
    514     0.0f,4.0f,0.0f,           // copper_mask_color
     514    0.05f,1.0f,0.0f,          // copper_mask_color
    515515    0,
    5165160,
     
    5695690,
    570570    0.75f,0.25f,0.42f,4.0f,   // copper_copper
    571     0.0f,4.0f,0.0f,           // copper_mask_color
     571    0.05f,1.0f,0.0f,          // copper_mask_color
    572572    0,
    5735730,
     
    6266260,
    627627    0.75f,0.25f,0.42f,4.0f,   // copper_copper
    628     0.0f,4.0f,0.0f,           // copper_mask_color
     628    0.05f,1.0f,0.0f,          // copper_mask_color
    629629    0,
    6306300,
     
    6836830,
    684684    0.75f,0.25f,0.42f,4.0f,   // copper_copper
    685     0.0f,4.0f,0.0f,           // copper_mask_color
     685    0.05f,1.0f,0.0f,          // copper_mask_color
    686686    0,
    6876870,
     
    10241024            else
    10251025            {
    1026                 caca_set_color_argb(m_cv_setup, setup_color.y, 0xfff);//setup_color.x);
     1026                caca_set_color_argb(m_cv_setup, setup_color.y, 0x0f0);//setup_color.x);
    10271027                caca_draw_line(m_cv_setup, 0, y, setup_size.z - 2, y,' ');
    10281028                caca_put_str(m_cv_setup, 1, y, setup_text[k]);
     
    10411041            else
    10421042            {
    1043                 caca_set_color_argb(m_cv_setup, setup_color.y, 0xfff);//setup_color.x);
     1043                caca_set_color_argb(m_cv_setup, setup_color.y, 0x0f0);//setup_color.x);
    10441044                caca_draw_line(m_cv_setup, setup_size.z, y, setup_size.x, y,' ');
    10451045                caca_put_str(m_cv_setup, setup_size.z + 1, y, setup_text[k]);
     
    15001500        shader_copper->SetUniform(shader_copper_time, fx_angle);
    15011501        shader_copper->SetUniform(shader_copper_copper, vec4(copper_copper.x, copper_copper.y, copper_copper.z * 16.0f, copper_copper.w * 16.0f));
    1502         shader_copper->SetUniform(shader_copper_mask_color, copper_mask_color / 4.0f);
     1502        shader_copper->SetUniform(shader_copper_mask_color, copper_mask_color);
    15031503        TraceQuad();
    15041504        shader_color->Unbind();
Note: See TracChangeset for help on using the changeset viewer.