Changeset 1993
- Timestamp:
- Oct 9, 2012, 2:06:41 AM (10 years ago)
- Location:
- trunk/tools/neercs/video
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/neercs/video/mirror.lolfx
r1986 r1993 23 23 24 24 vec3 color = vec3(0.0); 25 if(p.x < mirror.x) color = (texture2D(texture, vec2(mirror.x - (1.0 - mirror.x * mirror.w + p.x * mirror.w), p.y)).xyz) * (mirror.z / mirror.x * p.x); 26 if(p.x > 1.0 - mirror.x) color = (texture2D(texture, vec2(mirror.x - (1.0 - mirror.x * mirror.w + p.x * mirror.w), p.y)).xyz) * (mirror.z / mirror.x * (1.0 - p.x)); 25 if(p.x < mirror.x) color = (texture2D(texture, vec2(mirror.x + (mirror.x - p.x) * mirror.w, p.y)).xyz) * (mirror.z / mirror.x * p.x); 26 if(p.x > 1.0 - mirror.x) color = (texture2D(texture, vec2(- mirror.x - (mirror.x + p.x) * mirror.w, p.y)).xyz) * (mirror.z / mirror.x * (1.0 - p.x)); 27 if(p.y < mirror.y) color = (texture2D(texture, vec2(p.x, mirror.y + (mirror.y - p.y) * mirror.w)).xyz) * (mirror.z / mirror.y * p.y); 28 if(p.y > 1.0 - mirror.y) color = (texture2D(texture, vec2(p.x, - mirror.y - (mirror.y + p.y) * mirror.w)).xyz) * (mirror.z / mirror.y * (1.0 - p.y)); 27 29 28 gl_FragColor = vec4(source + color , 1.0);30 gl_FragColor = vec4(source + color + color * color, 1.0); 29 31 } -
trunk/tools/neercs/video/render.cpp
r1986 r1993 48 48 * Global variable -- ugly 49 49 */ 50 bool g_setup = true;50 bool g_setup = false; 51 51 52 52 /* … … 115 115 vec4 postfx_scanline_h(0.75f,0.0f,0.0f,0.0f); // vertical scanline [base,variable,repeat,shift] 116 116 vec4 postfx_scanline_v(0.75f,-0.25f,2.0f,0.0f); // horizontal scanline [base,variable,repeat,shift] 117 vec3 postfx_corner(0.0f,0. 75f,0.95f);// corner [width,radius,blur]118 vec4 mirror(0. 7f,0.7f,0.5f,4.0f);// mirror [width,height,strength,ratio]117 vec3 postfx_corner(0.0f,0.8f,0.96f); // corner [width,radius,blur] 118 vec4 mirror(0.6f,0.6f,0.25f,3.0f); // mirror [width,height,strength,ratio] 119 119 /* text variable */ 120 ivec2 ratio_2d( 2,3); // 2d ratio120 ivec2 ratio_2d(3,3); // 2d ratio 121 121 ivec2 map_size(256,256); // texture map size 122 122 ivec2 font_size(8,8); // font size … … 124 124 ivec2 canvas_size(0,0); // caca size 125 125 /* window variable */ 126 ivec2 border = vec2( 2,1) * ratio_2d * font_size; // border width126 ivec2 border = vec2(1,1) * ratio_2d * font_size; // border width 127 127 /* setup variable */ 128 128 bool setup_switch = false; // switch [option/item] … … 291 291 vec4(0, 1, 1, 1), 292 292 vec4(0.0f, 1.0f, 0.05f, postfx_deform.x), 293 vec4(0. 5f, 0.7f, 0.01f, postfx_deform.y),293 vec4(0.2f, 0.7f, 0.01f, postfx_deform.y), 294 294 vec4(0.0f, 4.0f, 0.10f, postfx_corner.x), 295 295 vec4(0.0f, 1.0f, 0.05f, postfx_corner.y), 296 vec4(0. 0f, 1.0f, 0.05f, postfx_corner.z),296 vec4(0.8f, 1.0f, 0.01f, postfx_corner.z), 297 297 vec4(0.0f, 1.0f, 0.10f, postfx_vignetting), 298 298 vec4(0),
Note: See TracChangeset
for help on using the changeset viewer.