Ignore:
Timestamp:
Aug 13, 2012, 2:25:42 PM (8 years ago)
Author:
sam
Message:

tutorial: nicer blur and colour effect in the FBO tutorial.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tutorial/08_fbo.lolfx

    r1734 r1735  
    3232    if (in_Flag == 0.0)
    3333    {
    34         float s = 4.0 + 4.0 * in_Point.z;
    35         vec2 p = pass_Position - in_Point.xy * 0.8;
    36         float f = clamp(1.0 - dot(s * p, s * p), 0.0, 1.0);
    37         f = sqrt(f);
    38         gl_FragColor = vec4(f * in_Color, f + 0.1);
     34        float tc = 0.0, ta = 0.0;
     35        {
     36            float s = 4.0 + 3.0 * in_Point.z;
     37            vec2 p = pass_Position - in_Point.xy * 0.8;
     38            float t = clamp(1.2 - dot(s * p, s * p), 0.0, 1.0);
     39            float u = t * t;
     40            tc += 3.0 * t * t - 2.0 * t * t * t;
     41            ta += 3.0 * u * u - 2.0 * u * u * u;
     42        }
     43
     44        gl_FragColor = vec4(tc * in_Color, ta + 0.1);
    3945    }
    4046    else
Note: See TracChangeset for help on using the changeset viewer.