Changeset 2051


Ignore:
Timestamp:
Oct 30, 2012, 2:44:17 AM (8 years ago)
Author:
rez
Message:

neercs: removed flags from setup, butchered scanline postfx

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

Legend:

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

    r2049 r2051  
    3232uniform float sync;
    3333uniform float beat;
     34
     35const float PI=3.14159265358979323846;
     36vec2 angle=screen_size*PI;
    3437
    3538vec2 screen(in vec2 p,in float bend,in float radius)
     
    9093    if(k>=r_p+r_h) r=mix(c4,c5,k*((k-(r_p+r_h))/(r_p-r_h)));
    9194
    92     c*=moire_h.x+moire_h.y*sin(z.y*float(screen_size.y*moire_h.z)/ratio_2d.y)*sin(0.5+z.x*float(screen_size.x*moire_h.w)/ratio_2d.x); // moire h
    93     c*=moire_v.x+moire_v.y*sin(z.x*float(screen_size.x*moire_v.z)/ratio_2d.x)*sin(0.5+z.y*float(screen_size.y*moire_v.w)/ratio_2d.y); // moire v
    94     c*=scanline_h.x+scanline_h.y*cos(z.y*float(screen_size.y*scanline_h.z+scanline_h.w)/ratio_2d.y); // scanline h
    95     c*=scanline_v.x+scanline_v.y*cos(z.x*float(screen_size.x*scanline_v.z+scanline_v.w)/ratio_2d.x); // scanline v
     95    c*=moire_h.x+moire_h.y*sin(z.y*float(angle.y*moire_h.z)/ratio_2d.y+PI); // moire h
     96    c*=moire_v.x+moire_v.y*sin(z.x*float(angle.x*moire_v.z)/ratio_2d.x+PI); // moire v
     97    c*=scanline_h.x+scanline_h.y*cos(z.y*float(angle.y*scanline_h.z+scanline_h.w)/ratio_2d.y); // scanline h
     98    c*=scanline_v.x+scanline_v.y*cos(z.x*float(angle.x*scanline_v.z+scanline_v.w)/ratio_2d.x); // scanline v
    9699    c+=r*gradient.z;                                         // gradient
    97100    c*=mix(1.0,mask,vignetting);                             // vignetting
  • trunk/tools/neercs/video/render.cpp

    r2049 r2051  
    158158        "",
    159159    "remanence",
    160         "enable",
    161160        "buffer new frame",
    162161        "buffer old frame",
     
    166165        "",
    167166        "",
     167        "",
    168168    "glow",
    169         "enable",
    170169        "source mix",
    171170        "glow mix",
     
    175174        "small corner",
    176175        "",
     176        "",
    177177    "blur",
    178         "enable",
    179178        "blur center",
    180179        "blur corner",
     
    184183        "",
    185184        "",
     185        "",
    186186    "screen",
    187         "enable",
    188187        "deform ratio",
    189188        "zoom base",
     
    193192        "vignetting",
    194193        "",
     194        "",
    195195    "copper",
    196         "enable",
    197196        "base",
    198197        "variable",
     
    202201        "color g",
    203202        "color b",
     203        "",
    204204    "color",
    205205        "filter red",
     
    212212        "aberration",
    213213    "noise",
    214         "enable",
    215214        "offset h",
    216215        "offset v",
     
    219218        "retrace length",
    220219        "retrace speed",
     220        "",
    221221        "",
    222222    "ghost",
     
    275275        "",
    276276    "radial",
    277         "enable",
    278277        "distance",
    279278        "fade ratio",
     
    282281        "",
    283282        "",
    284         ""
     283        "",
     284        "",
     285    ""
    285286    };
    286287
     
    296297    vec4(0),
    297298vec4(0), /* remanence */
    298     vec4(0, 1, 1, 1),
    299299    vec4(0.0f, 1.0f, 0.1f, 0), // buffer.x
    300300    vec4(0.0f, 1.0f, 0.1f, 0), // buffer.y
     
    304304    vec4(0),
    305305    vec4(0),
     306    vec4(0),
    306307vec4(0), /* glow */
    307     vec4(0, 1, 1, 1),
    308308    vec4(0.0f, 1.0f, 0.1f, 0), // glow_mix.x
    309309    vec4(0.0f, 1.0f, 0.1f, 0), // glow_mix.y
     
    313313    vec4(0.0f, 2.0f, 0.1f, 0), // glow_small.y
    314314    vec4(0),
     315    vec4(0),
    315316vec4(0), /* blur */
    316     vec4(0, 1, 1, 1),
    317317    vec4(0, 2, 0.05f, 0), // blur.x
    318318    vec4(0, 2, 0.05f, 0), // blur.y
     
    322322    vec4(0),
    323323    vec4(0),
     324    vec4(0),
    324325vec4(0), /* screen */
    325     vec4(0, 1, 1, 1),
    326326    vec4(0.0f, 1.0f, 0.05f, 0), // postfx_deform.x
    327327    vec4(0.2f, 0.7f, 0.01f, 0), // postfx_deform.y
     
    331331    vec4(0.0f, 1.0f, 0.10f, 0), // postfx_vignetting
    332332    vec4(0),
     333    vec4(0),
    333334vec4(0), /* copper */
    334     vec4(0, 1, 1, 1),
    335335    vec4(0.0f, 1.0f, 0.05f, 0), // copper_copper.x
    336336    vec4(0.0f, 1.0f, 0.05f, 0), // copper_copper.y
     
    340340    vec4(0.0f, 4.0f, 0.25f, 0), // copper_mask_color.y
    341341    vec4(0.0f, 4.0f, 0.25f, 0), // copper_mask_color.z
     342    vec4(0),
    342343vec4(0), /* color */
    343344    vec4( 0.0f, 1.0f, 0.05f, 0), // color_filter.x
     
    350351    vec4( 0.0f, 8.0f, 0.50f, 0), // postfx_aberration
    351352vec4(0), /* noise */
    352     vec4(0, 1, 1, 1),
    353353    vec4(0.0f, 4.0f, 0.50f, 0), // noise_offset.x
    354354    vec4(0.0f, 4.0f, 0.50f, 0), // noise_offset.y
     
    357357    vec4(0.0f, 8.0f, 0.50f, 0), // noise_retrace.y
    358358    vec4(0.0f, 4.0f, 0.25f, 0), // noise_retrace.z
     359    vec4(0),
    359360    vec4(0),
    360361vec4(0), /* ghost */
     
    388389    vec4( 0.5f, 1.0f, 0.05f, 0), // postfx_moire_h.x
    389390    vec4(-0.5f, 0.5f, 0.05f, 0), // postfx_moire_h.y
    390     vec4( 0.0f, 4.0f, 0.50f, 0), // postfx_moire_h.z
    391     vec4( 0.0f, 4.0f, 0.50f, 0), // postfx_moire_h.w
     391    vec4( 0.0f, 1.0f, 0.05f, 0), // postfx_moire_h.z
     392    vec4( 0.0f, 1.0f, 0.05f, 0), // postfx_moire_h.w
    392393    vec4( 0.5f, 1.0f, 0.05f, 0), // postfx_moire_v.x
    393394    vec4(-0.5f, 0.5f, 0.05f, 0), // postfx_moire_v.y
    394     vec4( 0.0f, 4.0f, 0.50f, 0), // postfx_moire_v.z
    395     vec4( 0.0f, 4.0f, 0.50f, 0), // postfx_moire_v.w
     395    vec4( 0.0f, 1.0f, 0.05f, 0), // postfx_moire_v.z
     396    vec4( 0.0f, 1.0f, 0.05f, 0), // postfx_moire_v.w
    396397vec4(0), /* scanline */
    397398    vec4( 0.5f, 1.0f, 0.05f, 0), // postfx_scanline_h.x
    398399    vec4(-0.5f, 0.5f, 0.05f, 0), // postfx_scanline_h.y
    399     vec4( 0.0f, 4.0f, 0.50f, 0), // postfx_scanline_h.z
    400     vec4( 0.0f, 4.0f, 0.50f, 0), // postfx_scanline_h.w
     400    vec4( 0.0f, 1.0f, 0.05f, 0), // postfx_scanline_h.z
     401    vec4( 0.0f, 1.0f, 0.05f, 0), // postfx_scanline_h.w
    401402    vec4( 0.5f, 1.0f, 0.05f, 0), // postfx_scanline_v.x
    402403    vec4(-0.5f, 0.5f, 0.05f, 0), // postfx_scanline_v.y
    403     vec4( 0.0f, 4.0f, 0.50f, 0), // postfx_scanline_v.z
    404     vec4( 0.0f, 4.0f, 0.50f, 0), // postfx_scanline_v.w
     404    vec4( 0.0f, 1.0f, 0.05f, 0), // postfx_scanline_v.z
     405    vec4( 0.0f, 1.0f, 0.05f, 0), // postfx_scanline_v.w
    405406vec4(0), /* mirror */
    406     vec4(0, 1, 1, 1),
    407407    vec4(0.0f, 2.0f, 0.05f, 0), // mirror.x
    408408    vec4(0.0f, 2.0f, 0.05f, 0), // mirror.y
     
    412412    vec4(0),
    413413    vec4(0),
     414    vec4(0),
    414415vec4(0), /* radial blur */
    415     vec4(0, 1, 1, 1),
    416416    vec4(2.0f, 8.0f, 0.25f, 0), // radial.x
    417417    vec4(0.8f, 1.0f, 0.01f, 0), // radial.y
     
    421421    vec4(0),
    422422    vec4(0),
     423    vec4(0),
    423424vec4(0) /* ? */
    424425};
     
    431432    0,0,0,0,
    4324330,
    433     1,                        // m_shader_remanence
    434434    1.0f,0.8f,                // buffer
    435435    0.0f,0.0f,                // remanence
    436     0,0,0,
    437 0,
    438     1,                        // m_shader_glow
     436    0,0,0,0,
     4370,
    439438    0.5f,0.0f,                // glow_mix
    440439    0.0f,0.0f,                // glow_large
    441440    0.0f,0.0f,                // glow_small
    442     0,
    443 0,
    444     1,                        // m_shader_blur
     441    0,0,
     4420,
    445443    0.0f,0.0f,                // blur
    446     0,0,0,0,0,
    447 0,
    448     1,                        // m_shader_postfx
     444    0,0,0,0,0,0,
     4450,
    449446    0.0f,0.5f,                // postfx_deform
    450447    0.0f,1.0f,1.0f,           // postfx_corner
    451448    0.0f,                     // postfx_vignetting
    452     0,
    453 0,
    454     1,                        // m_shader_copper
     449    0,0,
     4500,
    455451    0.75f,0.25f,0.42f,4.0f,   // copper_copper
    456452    4.0f,4.0f,4.0f,           // copper_mask_color
     453    0,
    4574540,
    458455    1.0f,1.0f,1.0f,           // color_filter
     
    460457    0.0f,                     // postfx_aberration
    4614580,
    462     1,                        // m_shader_noise
    463459    0.0f,0.0f,                // noise_offset
    464460    0.0f,                     // noise_noise
    465461    0.0f,0.0f,0.0f,           // noise_retrace
     462    0,0,
     4630,
     464    0.0f,0.0f,0.0f,0.0f,      // postfx_ghost1
     465    0.0f,0.0f,0.0f,0.0f,      // postfx_ghost2
     4660,
     467    0.5f,0.0f,0.0f,           // postfx_gradient
     468    0.0f,0.0f,0.0f,           // postfx_gradient_color
     469    0,0,
     4700,
     471    8.0f,0.0f,0.0f,0.0f,      // postfx_glass
     472    0,0,0,0,
     4730,
     474    1.0f,0.0f,0.0f,0.0f,      // postfx_moire_h
     475    1.0f,0.0f,0.0f,0.0f,      // postfx_moire_v
     4760,
     477    1.0f,0.0f,0.0f,0.0f,      // postfx_scanline_h
     478    1.0f,0.0f,0.0f,0.0f,      // postfx_scanline_v
     4790,
     480    0.0f,0.0f,0.0f,1.0f,      // mirror
     481    0,0,0,0,
     4820,
     483    4.0f,0.9f,1,0.0f,         // radial
     484    0,0,0,0,
     485/* crt */
     4860,
     487    2,3,                      // ratio_2d
     488    2,1,                      // border
     489    0,0,0,0,
     4900,
     491    0.2f,0.8f,                // buffer
     492    0.6f,0.4f,                // remanence
     493    0,0,0,0,
     4940,
     495    0.7f,0.3f,                // glow_mix
     496    3.0f,0.0f,                // glow_large
     497    1.5f,0.0f,                // glow_small
     498    0,0,
     4990,
     500    0.5f,0.0f,                // blur
     501    0,0,0,0,0,0,
     5020,
     503    0.8f,0.48f,               // postfx_deform
     504    0.0f,0.8f,0.96f,          // postfx_corner
     505    0.5f,                     // postfx_vignetting
     506    0,0,
     5070,
     508    0.75f,0.25f,0.42f,4.0f,   // copper_copper
     509    4.0f,4.0f,4.0f,           // copper_mask_color
    466510    0,
     5110,
     512    0.9f,0.95f,0.85f,         // color_filter
     513    1.0f,1.25f,0.1f,0.4f,     // color_color
     514    4.0f,                     // postfx_aberration
     5150,
     516    1.0f,1.0f,                // noise_offset
     517    0.15f,                    // noise_noise
     518    1.0f,1.0f,0.5f,           // noise_retrace
     519    0,0,
     5200,
     521    1.0f,0.0f,0.0f,-0.25f,    // postfx_ghost1
     522    1.5f,0.0f,0.0f,0.25f,     // postfx_ghost2
     5230,
     524    0.5f,0.25f,0.05f,         // postfx_gradient
     525    0.9f,0.8f,0.5f,           // postfx_gradient_color
     526    0,0,
     5270,
     528    8.0f,0.25f,0.75f,0.2f,    // postfx_glass
     529    0,0,0,0,
     5300,
     531    0.75f,0.0f,0.0f,0.0f,     // postfx_moire_h
     532    0.75f,-0.25f,0.25f,0.5f,  // postfx_moire_v
     5330,
     534    1.0f,0.0f,0.0f,0.0f,      // postfx_scanline_h
     535    0.75f,-0.25f,0.5f,0.0f,   // postfx_scanline_v
     5360,
     537    0.95f,0.9f,0.5f,4.0f,     // mirror
     538    0,0,0,0,
     5390,
     540    4.0f,0.9f,16,0.25f,       // radial
     541    0,0,0,0,
     542/* amber screen */
     5430,
     544    2,4,                      // ratio_2d
     545    1,0,                      // border
     546    0,0,0,0,
     5470,
     548    0.2f,0.8f,                // buffer
     549    0.6f,0.4f,                // remanence
     550    0,0,0,0,
     5510,
     552    0.4f,0.6f,                // glow_mix
     553    4.0f,0.0f,                // glow_large
     554    2.0f,0.0f,                // glow_small
     555    0,0,
     5560,
     557    0.5f,0.0f,                // blur
     558    0,0,0,0,0,0,
     5590,
     560    0.7f,0.5f,                // postfx_deform
     561    0.0f,0.85f,0.98f,         // postfx_corner
     562    0.5f,                     // postfx_vignetting
     563    0,0,
     5640,
     565    0.75f,0.25f,0.42f,4.0f,   // copper_copper
     566    4.0f,4.0f,4.0f,           // copper_mask_color
     567    0,
     5680,
     569    1.0f,0.75f,0.0f,          // color_filter
     570    1.0f,1.25f,0.2f,1.0f,     // color_color
     571    1.5f,                     // postfx_aberration
     5720,
     573    1.0f,0.0f,                // noise_offset
     574    0.25f,                    // noise_noise
     575    1.0f,2.0f,2.0f,           // noise_retrace
     576    0,0,
     5770,
     578    1.0f,0.0f,0.0f,-0.25f,    // postfx_ghost1
     579    1.5f,0.0f,0.0f,0.25f,     // postfx_ghost2
     5800,
     581    0.5f,0.15f,0.05f,         // postfx_gradient
     582    0.8f,0.8f,0.8f,           // postfx_gradient_color
     583    0,0,
     5840,
     585    8.0f,0.0f,0.0f,0.0f,      // postfx_glass
     586    0,0,0,0,
     5870,
     588    1.0f,0.0f,0.0f,0.0f,      // postfx_moire_h
     589    1.0f,0.0f,0.0f,0.0f,      // postfx_moire_v
     5900,
     591    0.6f,0.4f,1.0f,0.0f,      // postfx_scanline_h
     592    0.9f,0.1f,0.75f,0.0f,     // postfx_scanline_v
     5930,
     594    0.6f,0.6f,0.5f,4.0f,      // mirror
     595    0,0,0,0,
     5960,
     597    4.0f,0.84f,16,0.25f,      // radial
     598    0,0,0,0,
     599/* lcd */
     6000,
     601    2,2,                      // ratio_2d
     602    1,1,                      // border
     603    0,0,0,0,
     6040,
     605    0.4f,0.6f,                // buffer
     606    0.4f,0.6f,                // remanence
     607    0,0,0,0,
     6080,
     609    0.5f,0.5f,                // glow_mix
     610    2.4f,0.0f,                // glow_large
     611    1.2f,0.0f,                // glow_small
     612    0,0,
     6130,
     614    0.25f,0.0f,               // blur
     615    0,0,0,0,0,0,
     6160,
     617    0.0f,0.5f,                // postfx_deform
     618    0.0f,1.0f,1.0f,           // postfx_corner
     619    0.0f,                     // postfx_vignetting
     620    0,0,
     6210,
     622    0.75f,0.25f,0.42f,4.0f,   // copper_copper
     623    4.0f,4.0f,4.0f,           // copper_mask_color
     624    0,
     6250,
     626    1.0f,1.0f,0.9f,           // color_filter
     627    1.0f,1.15f,0.1f,0.25f,    // color_color
     628    2.0f,                     // postfx_aberration
     6290,
     630    0.0f,0.0f,                // noise_offset
     631    0.15f,                    // noise_noise
     632    0.0f,0.0f,0.0f,           // noise_retrace
     633    0,0,
    4676340,
    468635    0.0f,0.0f,0.0f,0.0f,      // postfx_ghost1
     
    479646    1.0f,0.0f,0.0f,0.0f,      // postfx_moire_v
    4806470,
    481     1.0f,0.0f,0.0f,0.0f,      // postfx_scanline_h
    482     1.0f,0.0f,0.0f,0.0f,      // postfx_scanline_v
    483 0,
    484     1,                        // m_shader_mirror
     648    0.80f,0.2f,0.75f,0.0f,    // postfx_scanline_h
     649    0.80f,0.2f,0.75f,0.0f,    // postfx_scanline_v
     6500,
    485651    0.0f,0.0f,0.0f,1.0f,      // mirror
    486     0,0,0,
    487 0,
    488     1,                        // m_shader_radial
     652    0,0,0,0,
     6530,
    489654    4.0f,0.9f,1,0.0f,         // radial
    490     0,0,0,
    491 /* crt */
    492 0,
    493     2,3,                      // ratio_2d
    494     2,1,                      // border
    495     0,0,0,0,
    496 0,
    497     1,                        // m_shader_remanence
    498     0.2f,0.8f,                // buffer
    499     0.6f,0.4f,                // remanence
    500     0,0,0,
    501 0,
    502     1,                        // m_shader_glow
    503     0.7f,0.3f,                // glow_mix
    504     3.0f,0.0f,                // glow_large
    505     1.5f,0.0f,                // glow_small
    506     0,
    507 0,
    508     1,                        // m_shader_blur
    509     0.5f,0.0f,                // blur
    510     0,0,0,0,0,
    511 0,
    512     1,                        // m_shader_postfx
    513     0.8f,0.48f,               // postfx_deform
    514     0.0f,0.8f,0.96f,          // postfx_corner
    515     0.5f,                     // postfx_vignetting
    516     0,
    517 0,
    518     1,                        // m_shader_copper
    519     0.75f,0.25f,0.42f,4.0f,   // copper_copper
    520     4.0f,4.0f,4.0f,           // copper_mask_color
    521 0,
    522     0.9f,0.95f,0.85f,         // color_filter
    523     1.0f,1.25f,0.1f,0.4f,     // color_color
    524     4.0f,                     // postfx_aberration
    525 0,
    526     1,                        // m_shader_noise
    527     1.0f,1.0f,                // noise_offset
    528     0.15f,                    // noise_noise
    529     1.0f,1.0f,0.5f,           // noise_retrace
    530     0,
    531 0,
    532     1.0f,0.0f,0.0f,-0.25f,    // postfx_ghost1
    533     1.5f,0.0f,0.0f,0.25f,     // postfx_ghost2
    534 0,
    535     0.5f,0.25f,0.05f,         // postfx_gradient
    536     0.9f,0.8f,0.5f,           // postfx_gradient_color
    537     0,0,
    538 0,
    539     8.0f,0.25f,0.75f,0.2f,    // postfx_glass
    540     0,0,0,0,
    541 0,
    542     0.75f,-0.25f,0.0f,1.0f,   // postfx_moire_h
    543     0.75f,-0.25f,1.0f,2.0f,   // postfx_moire_v
    544 0,
    545     1.0f,0.0f,0.0f,0.0f,      // postfx_scanline_h
    546     0.75f,-0.25f,2.0f,0.0f,   // postfx_scanline_v
    547 0,
    548     1,                        // m_shader_mirror
    549     0.95f,0.9f,0.5f,4.0f,     // mirror
    550     0,0,0,
    551 0,
    552     1,                        // m_shader_radial
    553     4.0f,0.9f,16,0.25f,       // radial
    554     0,0,0,
    555 /* green screen */
    556 0,
    557     2,4,                      // ratio_2d
    558     1,0,                      // border
    559     0,0,0,0,
    560 0,
    561     1,                        // m_shader_remanence
    562     0.2f,0.8f,                // buffer
    563     0.6f,0.4f,                // remanence
    564     0,0,0,
    565 0,
    566     1,                        // m_shader_glow
    567     0.4f,0.6f,                // glow_mix
    568     4.0f,0.0f,                // glow_large
    569     2.0f,0.0f,                // glow_small
    570     0,
    571 0,
    572     1,                        // m_shader_blur
    573     0.5f,0.0f,                // blur
    574     0,0,0,0,0,
    575 0,
    576     1,                        // m_shader_postfx
    577     0.7f,0.5f,                // postfx_deform
    578     0.0f,0.85f,0.98f,         // postfx_corner
    579     0.5f,                     // postfx_vignetting
    580     0,
    581 0,
    582     1,                        // m_shader_copper
    583     0.75f,0.25f,0.42f,4.0f,   // copper_copper
    584     4.0f,4.0f,4.0f,           // copper_mask_color
    585 0,
    586     1.0f,0.75f,0.0f,          // color_filter
    587     1.0f,1.25f,0.2f,1.0f,     // color_color
    588     1.5f,                     // postfx_aberration
    589 0,
    590     1,                        // m_shader_noise
    591     1.0f,0.0f,                // noise_offset
    592     0.25f,                    // noise_noise
    593     1.0f,2.0f,2.0f,           // noise_retrace
    594     0,
    595 0,
    596     1.0f,0.0f,0.0f,-0.25f,    // postfx_ghost1
    597     1.5f,0.0f,0.0f,0.25f,     // postfx_ghost2
    598 0,
    599     0.5f,0.15f,0.05f,         // postfx_gradient
    600     0.8f,0.8f,0.8f,           // postfx_gradient_color
    601     0,0,
    602 0,
    603     8.0f,0.0f,0.0f,0.0f,      // postfx_glass
    604     0,0,0,0,
    605 0,
    606     1.0f,0.0f,0.0f,0.0f,      // postfx_moire_h
    607     1.0f,0.0f,0.0f,0.0f,      // postfx_moire_v
    608 0,
    609     0.6f,0.4f,3.5f,0.0f,      // postfx_scanline_h
    610     0.9f,0.1f,2.5f,0.0f,      // postfx_scanline_v
    611 0,
    612     1,                        // m_shader_mirror
    613     0.6f,0.6f,0.5f,4.0f,      // mirror
    614     0,0,0,
    615 0,
    616     1,                        // m_shader_radial
    617     4.0f,0.84f,16,0.25f,      // radial
    618     0,0,0,
    619 /* lcd */
    620 0,
    621     2,2,                      // ratio_2d
    622     1,1,                      // border
    623     0,0,0,0,
    624 0,
    625     1,                        // m_shader_remanence
    626     0.2f,0.8f,                // buffer
    627     0.2f,0.8f,                // remanence
    628     0,0,0,
    629 0,
    630     1,                        // m_shader_glow
    631     0.6f,0.4f,                // glow_mix
    632     3.0f,0.0f,                // glow_large
    633     1.5f,0.0f,                // glow_small
    634     0,
    635 0,
    636     1,                        // m_shader_blur
    637     0.25f,0.0f,               // blur
    638     0,0,0,0,0,
    639 0,
    640     1,                        // m_shader_postfx
    641     0.0f,0.5f,                // postfx_deform
    642     0.0f,1.0f,1.0f,           // postfx_corner
    643     0.0f,                     // postfx_vignetting
    644     0,
    645 0,
    646     1,                        // m_shader_copper
    647     0.75f,0.25f,0.42f,4.0f,   // copper_copper
    648     4.0f,4.0f,4.0f,           // copper_mask_color
    649 0,
    650     1.0f,1.0f,0.9f,           // color_filter
    651     0.9f,1.1f,0.1f,0.0f,      // color_color
    652     3.0f,                     // postfx_aberration
    653 0,
    654     1,                        // m_shader_noise
    655     0.0f,0.0f,                // noise_offset
    656     0.15f,                    // noise_noise
    657     0.0f,0.0f,0.0f,           // noise_retrace
    658     0,
    659 0,
    660     0.0f,0.0f,0.0f,0.0f,      // postfx_ghost1
    661     0.0f,0.0f,0.0f,0.0f,      // postfx_ghost2
    662 0,
    663     0.5f,0.0f,0.0f ,          // postfx_gradient
    664     0.0f,0.0f,0.0f,           // postfx_gradient_color
    665     0,0,
    666 0,
    667     8.0f,0.0f,0.0f,0.0f,      // postfx_glass
    668     0,0,0,0,
    669 0,
    670     1.0f,0.0f,0.0f,0.0f,      // postfx_moire_h
    671     1.0f,0.0f,0.0f,0.0f,      // postfx_moire_v
    672 0,
    673     0.85f,0.15f,2.0f,0.0f,    // postfx_scanline_h
    674     0.85f,0.15f,2.0f,0.0f,    // postfx_scanline_v
    675 0,
    676     1,                        // m_shader_mirror
    677     0.0f,0.0f,0.0f,1.0f,      // mirror
    678     0,0,0,
    679 0,
    680     1,                        // m_shader_radial
    681     4.0f,0.9f,1,0.0f,         // radial
    682     0,0,0,
     655    0,0,0,0,
    683656/* granpa tv */
    684657/* intex system 4000 */
     
    691664    border = vec2(theme_var[k], theme_var[k + 1]); k += 2;
    692665    k += 5; /* remanence */
    693     m_shader_remanence = (theme_var[k] == 1) ? true : false; k++;
    694666    buffer = vec2(theme_var[k], theme_var[k + 1]); k += 2;
    695667    remanence = vec2(theme_var[k], theme_var[k + 1]); k += 2;
    696     k += 4; /* glow */
    697     m_shader_glow = (theme_var[k] == 1) ? true : false; k++;
     668    k += 5; /* glow */
    698669    glow_mix = vec2(theme_var[k], theme_var[k + 1]); k += 2;
    699670    glow_large = vec2(theme_var[k], theme_var[k + 1]); k += 2;
    700671    glow_small = vec2(theme_var[k], theme_var[k + 1]); k += 2;
    701     k += 2; /* blur */
    702     m_shader_blur = (theme_var[k] == 1) ? true : false; k++;
     672    k += 3; /* blur */
    703673    blur = vec2(theme_var[k], theme_var[k + 1]); k += 2;
    704     k += 6; /* screen */
    705     m_shader_postfx = (theme_var[k] == 1) ? true : false; k++;
     674    k += 7; /* screen */
    706675    postfx_deform = vec2(theme_var[k], theme_var[k + 1]); k += 2;
    707676    postfx_corner = vec3(theme_var[k], theme_var[k + 1], theme_var[k + 2]); k += 3;
    708677    postfx_vignetting = theme_var[k]; k++;
    709     k += 2; /* copper */
    710     m_shader_copper = (theme_var[k] == 1) ? true : false; k++;
     678    k += 3; /* copper */
    711679    copper_copper = vec4(theme_var[k], theme_var[k + 1], theme_var[k + 2], theme_var[k + 3]); k += 4;
    712680    copper_mask_color = vec3(theme_var[k], theme_var[k + 1], theme_var[k + 2]); k += 3;
    713     k += 1; /* color */
     681    k += 2; /* color */
    714682    color_filter = vec3(theme_var[k], theme_var[k + 1], theme_var[k + 2]); k += 3;
    715683    color_color = vec4(theme_var[k], theme_var[k + 1], theme_var[k + 2], theme_var[k + 3]); k += 4;
    716684    postfx_aberration = theme_var[k]; k++;
    717685    k += 1; /* noise */
    718     m_shader_noise = (theme_var[k] == 1) ? true : false; k++;
    719686    noise_offset = vec2(theme_var[k], theme_var[k + 1]); k += 2;
    720687    noise_noise = theme_var[k]; k++;
    721688    noise_retrace = vec3(theme_var[k], theme_var[k + 1], theme_var[k + 2]); k += 3;
    722     k += 2; /* ghost */
     689    k += 3; /* ghost */
    723690    postfx_ghost1 = vec4(theme_var[k], theme_var[k + 1], theme_var[k + 2], theme_var[k + 3]); k += 4;
    724691    postfx_ghost2 = vec4(theme_var[k], theme_var[k + 1], theme_var[k + 2], theme_var[k + 3]); k += 4;
     
    735702    postfx_scanline_v = vec4(theme_var[k], theme_var[k + 1], theme_var[k + 2], theme_var[k + 3]); k += 4;
    736703    k += 1; /* mirror */
    737     m_shader_mirror = (theme_var[k] == 1) ? true : false; k++;
    738704    mirror = vec4(theme_var[k], theme_var[k + 1], theme_var[k + 2], theme_var[k + 3]); k += 4;
    739     k += 4; /* radial blur */
    740     m_shader_radial = (theme_var[k] == 1) ? true : false; k++;
     705    k += 5; /* radial blur */
    741706    radial = vec4(theme_var[k], theme_var[k + 1], theme_var[k + 2], theme_var[k + 3]); k += 4;
    742707}
     
    951916    m_pause(false),
    952917    m_shader(true),
     918    m_shader_remanence(true),
    953919    m_shader_glow(true),
    954920    m_shader_blur(true),
    955     m_shader_remanence(true),
     921    m_shader_postfx(true),
    956922    m_shader_copper(true),
    957923    m_shader_color(true),
    958924    m_shader_noise(true),
    959     m_shader_postfx(true),
    960925    m_shader_mirror(true),
    961926    m_shader_radial(true)
     
    10821047    if (Input::WasPressed(Key::F2))
    10831048    {
     1049        m_shader_remanence = !m_shader_remanence;
    10841050        m_shader_glow = !m_shader_glow;
    10851051        m_shader_blur = !m_shader_blur;
    1086         m_shader_remanence = !m_shader_remanence;
     1052        m_shader_postfx = !m_shader_postfx;
    10871053        //m_shader_copper = !m_shader_copper;
    10881054        m_shader_color = !m_shader_color;
    10891055        m_shader_noise = !m_shader_noise;
    1090         m_shader_postfx = !m_shader_postfx;
    10911056        m_shader_mirror = !m_shader_mirror;
    10921057        m_shader_radial = !m_shader_radial;
     
    16391604        shader_postfx->SetUniform(shader_postfx_time, fx_angle);
    16401605        shader_postfx->SetUniform(shader_postfx_deform, postfx_deform);
    1641         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));
    1642         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));
    1643         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));
     1606        shader_postfx->SetUniform(shader_postfx_ghost1, vec4(postfx_ghost1.xyz * 0.01, postfx_ghost1.w));
     1607        shader_postfx->SetUniform(shader_postfx_ghost2, vec4(postfx_ghost2.xyz * 0.01, postfx_ghost2.w));
     1608        shader_postfx->SetUniform(shader_postfx_glass, vec4(postfx_glass.xy * 0.01, postfx_glass.z * 0.1, postfx_glass.w));
    16441609        shader_postfx->SetUniform(shader_postfx_gradient, postfx_gradient);
    16451610        shader_postfx->SetUniform(shader_postfx_gradient_color, postfx_gradient_color);
    16461611        shader_postfx->SetUniform(shader_postfx_vignetting, postfx_vignetting);
    16471612        shader_postfx->SetUniform(shader_postfx_aberration, postfx_aberration);
    1648         shader_postfx->SetUniform(shader_postfx_moire_h, postfx_moire_h);
    1649         shader_postfx->SetUniform(shader_postfx_moire_v, postfx_moire_v);
    1650         shader_postfx->SetUniform(shader_postfx_scanline_h, postfx_scanline_h);
    1651         shader_postfx->SetUniform(shader_postfx_scanline_v, postfx_scanline_v);
     1613        shader_postfx->SetUniform(shader_postfx_moire_h, vec4(postfx_moire_h.xyz, postfx_moire_h.w * 2 * M_PI));
     1614        shader_postfx->SetUniform(shader_postfx_moire_v, vec4(postfx_moire_v.xyz, postfx_moire_v.w * 2 * M_PI));
     1615        shader_postfx->SetUniform(shader_postfx_scanline_h, vec4(postfx_scanline_h.xyz, postfx_scanline_h.w * 2 * M_PI));
     1616        shader_postfx->SetUniform(shader_postfx_scanline_v, vec4(postfx_scanline_v.xyz, postfx_scanline_v.w * 2 * M_PI));
    16521617        shader_postfx->SetUniform(shader_postfx_corner, postfx_corner);
    16531618        shader_postfx->SetUniform(shader_postfx_sync, (float)fabs(sync_value * cosf((main_angle - sync_angle) * 6.0f)));
  • trunk/tools/neercs/video/render.h

    r2049 r2051  
    4040    bool m_pause;
    4141    bool m_shader;
     42    bool m_shader_remanence;
    4243    bool m_shader_glow;
    4344    bool m_shader_blur;
    44     bool m_shader_remanence;
     45    bool m_shader_postfx;
    4546    bool m_shader_copper;
    4647    bool m_shader_color;
    4748    bool m_shader_noise;
    48     bool m_shader_postfx;
    4949    bool m_shader_mirror;
    5050    bool m_shader_radial;
Note: See TracChangeset for help on using the changeset viewer.