Line | |
---|
1 | //------------------------------- |
---|
2 | //Bloom_ps20.glsl |
---|
3 | // Blends using weights the blurred image with the sharp one |
---|
4 | // Params: |
---|
5 | // OriginalImageWeight |
---|
6 | // BlurWeight |
---|
7 | //------------------------------- |
---|
8 | |
---|
9 | uniform sampler2D RT; |
---|
10 | uniform sampler2D Blur1; |
---|
11 | |
---|
12 | uniform float OriginalImageWeight; |
---|
13 | uniform float BlurWeight; |
---|
14 | |
---|
15 | void main() |
---|
16 | { |
---|
17 | vec4 sharp; |
---|
18 | vec4 blur; |
---|
19 | |
---|
20 | vec2 texCoord = vec2( gl_TexCoord[0] ); |
---|
21 | |
---|
22 | sharp = texture2D( RT, texCoord); |
---|
23 | blur = texture2D( Blur1, texCoord); |
---|
24 | |
---|
25 | gl_FragColor = ( (blur * BlurWeight) + (sharp * OriginalImageWeight) ); |
---|
26 | //gl_FragColor = vec4(0); |
---|
27 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.