Ignore:
Timestamp:
Sep 20, 2012, 12:23:59 AM (8 years ago)
Author:
sam
Message:

lolfx: use square brackets to indicate shader sections.

File:
1 edited

Legend:

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

    r1905 r1928  
    1 -- GLSL.Vert --
     1[vert.glsl]
    22
    33#version 120
    44
    55void main()
    6     {
    7     gl_Position=gl_Vertex;
    8     gl_TexCoord[0]=gl_MultiTexCoord0;
    9     }
     6{
     7    gl_Position = gl_Vertex;
     8    gl_TexCoord[0] = gl_MultiTexCoord0;
     9}
    1010
    11 -- GLSL.Frag --
     11[frag.glsl]
    1212
    1313#version 120
     
    1717
    1818void main(void)
    19     {
    20     vec4 total=vec4(0.0);
    21     vec2 p=gl_TexCoord[0].xy;
    22     float mask=2.0-p.x*(6.0-p.x*6.0)*p.y*(6.0-p.y*6.0);
    23     float b=radius.x+radius.y*mask;
    24     total+=texture2D(texture,vec2(p.x,p.y-b*4.0))*0.04;
    25     total+=texture2D(texture,vec2(p.x,p.y-b*3.0))*0.08;
    26     total+=texture2D(texture,vec2(p.x,p.y-b*2.0))*0.12;
    27     total+=texture2D(texture,vec2(p.x,p.y-b    ))*0.16;
    28     total+=texture2D(texture,vec2(p.x,p.y      ))*0.20;
    29     total+=texture2D(texture,vec2(p.x,p.y+b    ))*0.16;
    30     total+=texture2D(texture,vec2(p.x,p.y+b*2.0))*0.12;
    31     total+=texture2D(texture,vec2(p.x,p.y+b*3.0))*0.08;
    32     total+=texture2D(texture,vec2(p.x,p.y+b*4.0))*0.04;
    33     gl_FragColor=total;
    34     }
     19{
     20    vec4 total = vec4(0.0);
     21    vec2 p = gl_TexCoord[0].xy;
     22    float mask = 2.0-p.x*(6.0-p.x*6.0)*p.y*(6.0-p.y*6.0);
     23    float b = radius.x+radius.y*mask;
     24    total += texture2D(texture,vec2(p.x,p.y-b*4.0))*0.04;
     25    total += texture2D(texture,vec2(p.x,p.y-b*3.0))*0.08;
     26    total += texture2D(texture,vec2(p.x,p.y-b*2.0))*0.12;
     27    total += texture2D(texture,vec2(p.x,p.y-b    ))*0.16;
     28    total += texture2D(texture,vec2(p.x,p.y      ))*0.20;
     29    total += texture2D(texture,vec2(p.x,p.y+b    ))*0.16;
     30    total += texture2D(texture,vec2(p.x,p.y+b*2.0))*0.12;
     31    total += texture2D(texture,vec2(p.x,p.y+b*3.0))*0.08;
     32    total += texture2D(texture,vec2(p.x,p.y+b*4.0))*0.04;
     33    gl_FragColor = total;
     34}
     35
Note: See TracChangeset for help on using the changeset viewer.