source: trunk/neercs/video/glow.lolfx @ 1456

Last change on this file since 1456 was 1456, checked in by sam, 11 years ago

neercs: import Rez's code in our framework. Not ready yet.

File size: 545 bytes
Line 
1-- GLSL.Vert --
2
3#version 120
4
5void main()
6        {
7        gl_Position=gl_Vertex;
8        gl_TexCoord[0]=gl_MultiTexCoord0;
9        }
10
11-- GLSL.Frag --
12
13#version 120
14
15uniform sampler2D texture;
16uniform sampler2D texture_prv;
17uniform int screen_w;
18uniform int screen_h;
19uniform float time;
20uniform float step;
21uniform float value1;
22uniform float value2;
23
24void main(void)
25        {
26        vec2 p=gl_TexCoord[0].xy;
27        vec4 source=texture2D(texture_prv,p);
28        vec4 glow=texture2D(texture,p);
29        source=smoothstep(step,1.0,source);
30        vec4 color=glow*value1+source*value2;
31        gl_FragColor=color;
32        }
Note: See TracBrowser for help on using the repository browser.