source: trunk/tools/neercs/video/remanency.lolfx @ 1644

Last change on this file since 1644 was 1644, checked in by rez, 10 years ago

remanency expanded to 6 buffers, 3 ared used and blended (2,4 and 6)

File size: 671 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_buffer1;
17uniform sampler2D texture_buffer2;
18uniform sampler2D texture_buffer3;
19uniform vec2 screen_size;
20uniform float time;
21uniform float value1;
22uniform float value2;
23
24void main(void)
25        {
26        vec2 p=gl_TexCoord[0].xy;
27        vec4 source=texture2D(texture,p);
28        vec4 buffer1=texture2D(texture_buffer1,p);
29        vec4 buffer2=texture2D(texture_buffer2,p);
30        vec4 buffer3=texture2D(texture_buffer3,p);
31        vec4 color=source*value1+buffer1*value2+buffer2*value2+buffer3*value2;
32        gl_FragColor=color;
33        }
Note: See TracBrowser for help on using the repository browser.