Ignore:
Timestamp:
Jul 26, 2012, 6:38:45 PM (8 years ago)
Author:
rez
Message:

postfx optimization

File:
1 edited

Legend:

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

    r1661 r1672  
    1414
    1515uniform sampler2D texture;
    16 uniform vec2 screen_size;
    17 uniform float blur;
    18 uniform float deform;
    19 
    20 const float PI=3.14159265358979323846;
     16uniform vec2 radius;
    2117
    2218void main(void)
    2319        {
    2420        vec4 total=vec4(0.0);
    25         vec2 p=gl_TexCoord[0].xy/screen_size;
     21        vec2 p=gl_TexCoord[0].xy;
    2622        float mask=2.0-p.x*(6.0-p.x*6.0)*p.y*(6.0-p.y*6.0);
    27         float b=blur+deform*mask;
     23        float b=radius.x+radius.y*mask;
    2824        total+=texture2D(texture,vec2(p.x-b*4.0,p.y))*0.04;
    2925        total+=texture2D(texture,vec2(p.x-b*3.0,p.y))*0.08;
Note: See TracChangeset for help on using the changeset viewer.