Changeset 2003


Ignore:
Timestamp:
Oct 9, 2012, 5:35:55 PM (5 years ago)
Author:
rez
Message:

neercs: lowered noise effect

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

Legend:

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

    r1962 r2003  
    55void main()
    66{
    7     gl_Position = gl_Vertex;
    8     gl_TexCoord[0] = gl_MultiTexCoord0;
     7    gl_Position=gl_Vertex;
     8    gl_TexCoord[0]=gl_MultiTexCoord0;
    99}
    1010
     
    2222float rand(in vec2 p,in float t,in float v)
    2323{
    24     return fract(sin(dot(p+mod(t,2.0),vec2(12.9898,78.2333)))*v);
     24    return fract(sin(dot(p+mod(t,1.0),vec2(12.9898,78.2333)))*v);
    2525}
    2626
    2727void main(void)
    2828{
    29     vec2 p = gl_FragCoord.xy/screen_size.xy;
     29    vec2 p=gl_FragCoord.xy/screen_size.xy;
    3030
    31     float r1 = rand(p,time,43758.5453);
    32     float r2 = rand(p,time,70425.2854);
    33     vec2 o = (offset-offset*2.0*r1)/screen_size;
     31    float r1=rand(p,time,43758.5453);
     32    float r2=rand(p,time,70425.2854);
     33    vec2 o=(offset-offset*2.0*r1)/screen_size;
    3434
    35     vec3 c = texture2D(texture,p+o).xyz;                          // offset
    36     c *= 1.0+(noise-noise*2.0*r1);                                // noise
    37     c -= retrace.x*0.01*mod(p.y*retrace.y+time*retrace.z,1.0);    // retrace
    38     gl_FragColor = vec4(c,1.0);
     35    vec3 c=texture2D(texture,p+o).xyz;                          // offset
     36    c*=1.0+(noise-noise*2.0*r1);                                // noise
     37    c-=retrace.x*0.01*mod(p.y*retrace.y+time*retrace.z,1.0);    // retrace
     38    gl_FragColor=vec4(c,1.0);
    3939}
  • trunk/tools/neercs/video/render.cpp

    r2000 r2003  
    103103vec3 copper_mask_color(4.0f,4.0f,4.0f);         // color [red,green,blue]
    104104vec3 color_filter(0.9f,0.95f,0.85f);            // color filter [red,green,blue]
    105 vec4 color_color(1.5f,1.2f,0.1f,0.35f);         // color modifier [brightness,contrast,level,grayscale]
    106 vec2 noise_offset(2.0f,2.0f);                   // random line [horizontal,vertical]
    107 float noise_noise = 0.25f;                      // noise
     105vec4 color_color(1.4f,1.2f,0.1f,0.35f);         // color modifier [brightness,contrast,level,grayscale]
     106vec2 noise_offset(1.0f,1.0f);                   // random line [horizontal,vertical]
     107float noise_noise = 0.15f;                      // noise
    108108vec3 noise_retrace(1.0f,1.0f,0.5f);             // retrace [strength,length,speed]
    109109vec2 postfx_deform(0.8f,0.52f);                 // deformation [ratio,zoom]
     
    114114vec4 postfx_moire_h(0.75f,-0.25f,0.0f,1.0f);    // vertical moire [base,variable,repeat,shift]
    115115vec4 postfx_moire_v(0.75f,-0.25f,1.0f,1.5f);    // horizontal moire [base,variable,repeat,shift]
    116 vec4 postfx_scanline_h(0.75f,0.0f,0.0f,0.0f);   // vertical scanline [base,variable,repeat,shift]
     116vec4 postfx_scanline_h(1.0f,0.0f,0.0f,0.0f);    // vertical scanline [base,variable,repeat,shift]
    117117vec4 postfx_scanline_v(0.75f,-0.25f,2.0f,0.0f); // horizontal scanline [base,variable,repeat,shift]
    118118vec3 postfx_corner(0.0f,0.8f,0.96f);            // corner [width,radius,blur]
    119 vec4 mirror(0.6f,0.6f,0.25f,3.0f);              // mirror [width,height,strength,ratio]
     119vec4 mirror(0.6f,0.6f,0.4f,4.0f);               // mirror [width,height,strength,ratio]
    120120/* text variable */
    121 ivec2 ratio_2d(3,3);            // 2d ratio
     121ivec2 ratio_2d(2,3);            // 2d ratio
    122122ivec2 map_size(256,256);        // texture map size
    123123ivec2 font_size(8,8);           // font size
    124124ivec2 canvas_char(0,0);         // canvas char number
    125125ivec2 canvas_size(0,0);         // caca size
    126 /* window variable */
    127 ivec2 border = vec2(1,1) * ratio_2d * font_size; // border width
     126ivec2 border(2 * ratio_2d.x * font_size.x,1 * ratio_2d.x * font_size.y); // border width
    128127/* setup variable */
    129128bool setup_switch = false;      // switch [option/item]
  • trunk/tools/neercs/video/text-render.cpp

    r1773 r2003  
    4141void TextRender::Init()
    4242{
    43     m_font = new TileSet("tools/neercs/video/resource/charset_dos.png",
     43    m_font = new TileSet("tools/neercs/video/resource/charset_p0t-noodle.png",
    4444                         ivec2(256, 256), ivec2(1));
    4545
Note: See TracChangeset for help on using the changeset viewer.