Changeset 1783
- Timestamp:
- Aug 21, 2012, 1:35:57 AM (11 years ago)
- Location:
- trunk/tools/neercs/video
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/neercs/video/postfx.lolfx
r1736 r1783 61 61 p.y+=0.025*sync; 62 62 vec2 z =screen(p,deform.y); 63 vec2 z1=screen(p,deform.y -ghost.x*0.1);64 vec2 z2=screen(p,deform.y+ghost.z*0. 1);63 vec2 z1=screen(p,deform.y+ghost.x*0.01); 64 vec2 z2=screen(p,deform.y+ghost.z*0.01); 65 65 float mask=q.x*(6.0-q.x*6.0)*q.y*(6.0-q.y*6.0); 66 66 … … 69 69 vec2 o=(offset-offset*2.0*rnd.x)/screen_size; // offset 70 70 vec3 source=get_color(texture,z+o); // offset added to source 71 vec3 glass1=get_color(texture,z1 );72 vec3 glass2=get_color(texture,z2 );71 vec3 glass1=get_color(texture,z1-vec2(0.25,0.0)); 72 vec3 glass2=get_color(texture,z2-vec2(0.25,0.0)); 73 73 74 74 float v=aberration/float(screen_size.x)+aberration/float(screen_size.x)*(2.0-mask); -
trunk/tools/neercs/video/render.cpp
r1773 r1783 102 102 float postfx_noise = 0.15f; // noise 103 103 float postfx_aberration = 3.0f; // chromatic aberration 104 vec4 postfx_ghost(0.1f, 0.25f,0.1f,0.5f); // ghost picture [distance,strength,distance,strength]104 vec4 postfx_ghost(0.1f,-0.25f,0.1f,0.5f); // ghost picture [distance,strength,distance,strength] 105 105 vec4 postfx_moire_h(0.75f,-0.25f,0.0f,1.0f); // vertical moire [base,variable,repeat x,repeat y] 106 106 vec4 postfx_moire_v(0.75f,-0.25f,1.0f,1.5f); // horizontal moire [base,variable,repeat x,repeat y] … … 284 284 vec4(0), 285 285 vec4(0), /* ghost */ 286 vec4(0.0f, 0.2f, 0.01f, postfx_ghost.x),287 vec4( 0.0f, 1.0f, 0.05f, postfx_ghost.y),288 vec4(0.0f, 0.2f, 0.01f, postfx_ghost.z),289 vec4( 0.0f, 1.0f, 0.05f, postfx_ghost.w),286 vec4(0.0f, 2.0f, 0.1f, postfx_ghost.x), 287 vec4(-1.0f, 1.0f, 0.1f, postfx_ghost.y), 288 vec4(0.0f, 2.0f, 0.1f, postfx_ghost.z), 289 vec4(-1.0f, 1.0f, 0.1f, postfx_ghost.w), 290 290 vec4(0), 291 291 vec4(0), … … 297 297 vec4(0.0f, 4.0f, 0.5f, postfx_moire_h.z), 298 298 vec4(0.0f, 4.0f, 0.5f, postfx_moire_h.w), 299 vec4(0.5f, 1.0f, 0. 1f, postfx_moire_v.x),300 vec4(-0.5f, 0.5f, 0. 1f, postfx_moire_v.y),299 vec4(0.5f, 1.0f, 0.05f, postfx_moire_v.x), 300 vec4(-0.5f, 0.5f, 0.05f, postfx_moire_v.y), 301 301 vec4(0.0f, 4.0f, 0.5f, postfx_moire_v.z), 302 302 vec4(0.0f, 4.0f, 0.5f, postfx_moire_v.w), … … 306 306 vec4(0.0f, 4.0f, 0.5f, postfx_scanline_h.z), 307 307 vec4(0.0f, 4.0f, 0.5f, postfx_scanline_h.w), 308 vec4(0.5f, 1.0f, 0. 1f, postfx_scanline_v.x),309 vec4(-0.5f, 0.5f, 0. 1f, postfx_scanline_v.y),308 vec4(0.5f, 1.0f, 0.05f, postfx_scanline_v.x), 309 vec4(-0.5f, 0.5f, 0.05f, postfx_scanline_v.y), 310 310 vec4(0.0f, 4.0f, 0.5f, postfx_scanline_v.z), 311 311 vec4(0.0f, 4.0f, 0.5f, postfx_scanline_v.w), … … 357 357 { 358 358 int k = !setup_switch ? (i * (setup_item_n + 1)) : (setup_option * (setup_item_n + 1) + 1 + i); 359 if (setup_text[k] == "") return i ;359 if (setup_text[k] == "") return i - 1; 360 360 } 361 361 return n - 1; … … 787 787 if (setup_switch) 788 788 { 789 int x = setup_p.x + 1; 789 790 int w = setup_size.x - 3 - 4; 790 int bar_w = (w / (setup_var[setup_item_key].y - setup_var[setup_item_key].x) * setup_var[setup_item_key].w); 791 int bar_w = w / (setup_var[setup_item_key].y - setup_var[setup_item_key].x); 792 int bar_x = bar_w * setup_var[setup_item_key].x; 791 793 if ((setup_var[setup_item_key].y - setup_var[setup_item_key].x) / setup_var[setup_item_key].z > 2) 792 794 { 793 795 caca_printf(m_caca, setup_p.x + setup_size.x - 4, y, "%4.2f", setup_var[setup_item_key].w); 794 caca_draw_line(m_caca, setup_p.x + 1, y, setup_p.x + 1 + w, y,'.');795 if(setup_var[setup_item_key].w > setup_var[setup_item_key].x) caca_draw_line(m_caca, setup_p.x + 1, y, setup_p.x + 1 + bar_w, y,'x');796 caca_draw_line(m_caca, x, y, x - bar_x + bar_w * setup_var[setup_item_key].y, y,'.'); 797 if(setup_var[setup_item_key].w != setup_var[setup_item_key].x) caca_draw_line(m_caca, x, y, x - bar_x + bar_w * setup_var[setup_item_key].w, y,'x'); 796 798 } 797 799 else
Note: See TracChangeset
for help on using the changeset viewer.