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

postfx optimization

File:
1 edited

Legend:

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

    r1459 r1672  
    1313#version 120
    1414
    15 uniform sampler2D texture;
    16 uniform sampler2D texture_prv;
    17 uniform vec2 screen_size;
    18 uniform float time;
    19 uniform float step;
    20 uniform float value1;
    21 uniform float value2;
     15uniform sampler2D glow;
     16uniform sampler2D source;
     17uniform vec3 mix;
    2218
    2319void main(void)
    2420        {
    25         vec2 p=gl_TexCoord[0].xy;
    26         vec4 source=texture2D(texture_prv,p);
    27         vec4 glow=texture2D(texture,p);
    28         source=smoothstep(step,1.0,source);
    29         vec4 color=glow*value1+source*value2;
    30         gl_FragColor=color;
     21        gl_FragColor=smoothstep(mix.z,1.0,texture2D(source,gl_TexCoord[0].xy))*mix.x+texture2D(glow,gl_TexCoord[0].xy)*mix.y;
    3122        }
Note: See TracChangeset for help on using the changeset viewer.