Changeset 1661 for trunk/tools/neercs/video/blurv.lolfx
 Timestamp:
 Jul 22, 2012, 3:16:07 AM (8 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/tools/neercs/video/blurv.lolfx
r1459 r1661 15 15 uniform sampler2D texture; 16 16 uniform vec2 screen_size; 17 uniform float time;18 uniform float value;17 uniform float blur; 18 uniform float deform; 19 19 20 float blur=value;20 const float PI=3.14159265358979323846; 21 21 22 22 void main(void) … … 24 24 vec4 total=vec4(0.0); 25 25 vec2 p=gl_TexCoord[0].xy/screen_size; 26 total+=texture2D(texture,vec2(p.x,p.yblur*4.0))*0.04; 27 total+=texture2D(texture,vec2(p.x,p.yblur*3.0))*0.08; 28 total+=texture2D(texture,vec2(p.x,p.yblur*2.0))*0.12; 29 total+=texture2D(texture,vec2(p.x,p.yblur ))*0.16; 30 total+=texture2D(texture,vec2(p.x,p.y ))*0.20; 31 total+=texture2D(texture,vec2(p.x,p.y+blur ))*0.16; 32 total+=texture2D(texture,vec2(p.x,p.y+blur*2.0))*0.12; 33 total+=texture2D(texture,vec2(p.x,p.y+blur*3.0))*0.08; 34 total+=texture2D(texture,vec2(p.x,p.y+blur*4.0))*0.04; 26 float mask=2.0p.x*(6.0p.x*6.0)*p.y*(6.0p.y*6.0); 27 float b=blur+deform*mask; 28 total+=texture2D(texture,vec2(p.x,p.yb*4.0))*0.04; 29 total+=texture2D(texture,vec2(p.x,p.yb*3.0))*0.08; 30 total+=texture2D(texture,vec2(p.x,p.yb*2.0))*0.12; 31 total+=texture2D(texture,vec2(p.x,p.yb ))*0.16; 32 total+=texture2D(texture,vec2(p.x,p.y ))*0.20; 33 total+=texture2D(texture,vec2(p.x,p.y+b ))*0.16; 34 total+=texture2D(texture,vec2(p.x,p.y+b*2.0))*0.12; 35 total+=texture2D(texture,vec2(p.x,p.y+b*3.0))*0.08; 36 total+=texture2D(texture,vec2(p.x,p.y+b*4.0))*0.04; 35 37 gl_FragColor=total; 36 38 }
Note: See TracChangeset
for help on using the changeset viewer.