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

Last change on this file since 1459 was 1459, checked in by sam, 8 years ago

neercs: some refactoring.

File size: 527 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 vec2 screen_size;
18uniform float time;
19uniform float step;
20uniform float value1;
21uniform float value2;
22
23void main(void)
24        {
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;
31        }
Note: See TracBrowser for help on using the repository browser.