diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-02-19 22:54:40 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-02-19 22:54:40 -0500 |
commit | e3e5a247c58c6e0b45d81ab61314bd8d1bd530ac (patch) | |
tree | 261c046c1dac2ee0473fae547b9a15b0ee46f0c4 /shaders/bloom2.fragment | |
parent | cd48894563052baeddff64f6bbc13ccc7fa6e081 (diff) | |
download | therapy-e3e5a247c58c6e0b45d81ab61314bd8d1bd530ac.tar.gz therapy-e3e5a247c58c6e0b45d81ab61314bd8d1bd530ac.tar.bz2 therapy-e3e5a247c58c6e0b45d81ab61314bd8d1bd530ac.zip |
Added ability to resize window (full screen is really laggy though!)
Diffstat (limited to 'shaders/bloom2.fragment')
-rw-r--r-- | shaders/bloom2.fragment | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shaders/bloom2.fragment b/shaders/bloom2.fragment index aa69f0f..1d9cac4 100644 --- a/shaders/bloom2.fragment +++ b/shaders/bloom2.fragment | |||
@@ -7,6 +7,7 @@ out vec3 color; | |||
7 | uniform sampler2D screenTex; | 7 | uniform sampler2D screenTex; |
8 | uniform sampler2D downsampledTex; | 8 | uniform sampler2D downsampledTex; |
9 | uniform float iGlobalTime; | 9 | uniform float iGlobalTime; |
10 | uniform vec2 resolution; | ||
10 | 11 | ||
11 | float nrand(vec2 n) | 12 | float nrand(vec2 n) |
12 | { | 13 | { |
@@ -46,7 +47,7 @@ void main() | |||
46 | vec2 ofs = fTaps_Poisson[i]; | 47 | vec2 ofs = fTaps_Poisson[i]; |
47 | ofs = vec2(dot(ofs, basis.xz), dot(ofs, basis.yw)); | 48 | ofs = vec2(dot(ofs, basis.xz), dot(ofs, basis.yw)); |
48 | 49 | ||
49 | vec2 texcoord = UV + max_siz * ofs / vec2(64.0,48.0); | 50 | vec2 texcoord = UV + max_siz * ofs / (resolution / vec2(16.0)); |
50 | sum += texture(downsampledTex, texcoord, -10.0); | 51 | sum += texture(downsampledTex, texcoord, -10.0); |
51 | } | 52 | } |
52 | 53 | ||