Ignore:
Timestamp:
Oct 23, 2012, 1:10:22 AM (8 years ago)
Author:
rez
Message:

neercs: added a protection glass above the monitor

File:
1 edited

Legend:

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

    r2021 r2039  
    113113vec4 postfx_ghost1(1.0f,0.0f,0.0f,-0.25f);      // ghost picture 1 [position x,position y,position z,strength]
    114114vec4 postfx_ghost2(1.5f,0.0f,0.0f,0.25f);       // ghost picture 2 [position x,position y,position z,strength]
     115vec4 postfx_glass(8.0f,0.25f,0.75f,0.2f);       // glass [depth,thickness,strength,deform ratio]
    115116vec4 postfx_moire_h(0.75f,-0.25f,0.0f,1.0f);    // vertical moire [base,variable,repeat,shift]
    116 vec4 postfx_moire_v(0.75f,-0.25f,1.0f,1.5f);    // horizontal moire [base,variable,repeat,shift]
     117vec4 postfx_moire_v(0.75f,-0.25f,1.0f,2.0f);    // horizontal moire [base,variable,repeat,shift]
    117118vec4 postfx_scanline_h(1.0f,0.0f,0.0f,0.0f);    // vertical scanline [base,variable,repeat,shift]
    118119vec4 postfx_scanline_v(0.75f,-0.25f,2.0f,0.0f); // horizontal scanline [base,variable,repeat,shift]
    119120vec3 postfx_corner(0.0f,0.8f,0.96f);            // corner [width,radius,blur]
    120121vec4 mirror(0.95f,0.9f,0.4f,4.0f);              // mirror [width,height,strength,ratio]
    121 vec4 radial(4.0f,0.9f,16,0.5f);                 // radial [distance,fade ratio,iteration,strength]
     122vec4 radial(4.0f,0.9f,16,0.25f);                // radial [distance,fade ratio,iteration,strength]
    122123/* text variable */
    123124ivec2 ratio_2d(2,3);            // 2d ratio
     
    133134int setup_cursor = 0;           // cursor position
    134135int setup_option_i = 0;         // selected option
    135 int setup_option_n = 13;        // option number
     136int setup_option_n = 14;        // option number
    136137int setup_option_p = 0;         // option position
    137138int setup_item_i = 0;           // selected item
     
    224225        "front z",
    225226        "front strength",
     227    "glass",
     228        "depth",
     229        "thickness",
     230        "strength",
     231        "deform ratio",
     232        "",
     233        "",
     234        "",
     235        "",
    226236    "moire",
    227237        "h base",
     
    344354        vec4(-2.0f, 2.0f, 0.10f, postfx_ghost2.z),
    345355        vec4(-1.0f, 1.0f, 0.05f, postfx_ghost2.w),
     356    vec4(0), /* glass */
     357        vec4(0.0f, 16.0f, 0.50f, postfx_glass.x),
     358        vec4(0.0f,  1.0f, 0.05f, postfx_glass.y),
     359        vec4(0.0f,  2.0f, 0.05f, postfx_glass.z),
     360        vec4(0.0f,  1.0f, 0.05f, postfx_glass.w),
     361        vec4(0),
     362        vec4(0),
     363        vec4(0),
     364        vec4(0),
    346365    vec4(0), /* moire */
    347366        vec4( 0.5f, 1.0f, 0.05f, postfx_moire_h.x),
     
    421440    postfx_ghost1 = vec4(setup_var[k].w, setup_var[k + 1].w, setup_var[k + 2].w, setup_var[k + 3].w); k += 4;
    422441    postfx_ghost2 = vec4(setup_var[k].w, setup_var[k + 1].w, setup_var[k + 2].w, setup_var[k + 3].w); k += 4;
    423     k += 1; /* moire */
     442    k += 1; /* glass */
     443    postfx_glass = vec4(setup_var[k].w, setup_var[k + 1].w, setup_var[k + 2].w, setup_var[k + 3].w); k += 4;
     444    k += 5; /* moire */
    424445    postfx_moire_h = vec4(setup_var[k].w, setup_var[k + 1].w, setup_var[k + 2].w, setup_var[k + 3].w); k += 4;
    425446    postfx_moire_v = vec4(setup_var[k].w, setup_var[k + 1].w, setup_var[k + 2].w, setup_var[k + 3].w); k += 4;
     
    500521              shader_postfx_ghost1,
    501522              shader_postfx_ghost2,
     523              shader_postfx_glass,
    502524              shader_postfx_vignetting,
    503525              shader_postfx_aberration,
     
    601623    shader_postfx_ghost1 = shader_postfx->GetUniformLocation("ghost1");
    602624    shader_postfx_ghost2 = shader_postfx->GetUniformLocation("ghost2");
     625    shader_postfx_glass = shader_postfx->GetUniformLocation("glass");
    603626    shader_postfx_vignetting = shader_postfx->GetUniformLocation("vignetting");
    604627    shader_postfx_aberration = shader_postfx->GetUniformLocation("aberration");
     
    13101333        shader_postfx->SetUniform(shader_postfx_time, fx_angle);
    13111334        shader_postfx->SetUniform(shader_postfx_deform, postfx_deform);
    1312         shader_postfx->SetUniform(shader_postfx_ghost1, postfx_ghost1);
    1313         shader_postfx->SetUniform(shader_postfx_ghost2, postfx_ghost2);
     1335        shader_postfx->SetUniform(shader_postfx_ghost1, vec4(postfx_ghost1.x * 0.01, postfx_ghost1.y * 0.01, postfx_ghost1.z * 0.01, postfx_ghost1.w));
     1336        shader_postfx->SetUniform(shader_postfx_ghost2, vec4(postfx_ghost2.x * 0.01, postfx_ghost2.y * 0.01, postfx_ghost2.z * 0.01, postfx_ghost2.w));
     1337        shader_postfx->SetUniform(shader_postfx_glass, vec4(postfx_glass.x * 0.01, postfx_glass.y * 0.01, postfx_glass.z * 0.1, postfx_glass.w));
    13141338        shader_postfx->SetUniform(shader_postfx_vignetting, postfx_vignetting);
    13151339        shader_postfx->SetUniform(shader_postfx_aberration, postfx_aberration);
Note: See TracChangeset for help on using the changeset viewer.