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 | |
---|
5 | void main() |
---|
6 | { |
---|
7 | gl_Position=gl_Vertex; |
---|
8 | gl_TexCoord[0]=gl_MultiTexCoord0; |
---|
9 | } |
---|
10 | |
---|
11 | -- GLSL.Frag -- |
---|
12 | |
---|
13 | #version 120 |
---|
14 | |
---|
15 | uniform sampler2D texture; |
---|
16 | uniform sampler2D texture_prv; |
---|
17 | uniform int screen_w; |
---|
18 | uniform int screen_h; |
---|
19 | uniform float time; |
---|
20 | uniform float step; |
---|
21 | uniform float value1; |
---|
22 | uniform float value2; |
---|
23 | |
---|
24 | void 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.