summary refs log tree commit diff stats
path: root/shaders/bloom1.fragment
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2015-02-19 22:54:40 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2015-02-19 22:54:40 -0500
commite3e5a247c58c6e0b45d81ab61314bd8d1bd530ac (patch)
tree261c046c1dac2ee0473fae547b9a15b0ee46f0c4 /shaders/bloom1.fragment
parentcd48894563052baeddff64f6bbc13ccc7fa6e081 (diff)
downloadtherapy-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/bloom1.fragment')
-rw-r--r--shaders/bloom1.fragment3
1 files changed, 2 insertions, 1 deletions
diff --git a/shaders/bloom1.fragment b/shaders/bloom1.fragment index 4940933..cfb2799 100644 --- a/shaders/bloom1.fragment +++ b/shaders/bloom1.fragment
@@ -6,6 +6,7 @@ out vec3 color;
6 6
7uniform sampler2D screenTex; 7uniform sampler2D screenTex;
8uniform float iGlobalTime; 8uniform float iGlobalTime;
9uniform vec2 resolution;
9 10
10float nrand(vec2 n) 11float nrand(vec2 n)
11{ 12{
@@ -45,7 +46,7 @@ void main()
45 vec2 ofs = fTaps_Poisson[i]; 46 vec2 ofs = fTaps_Poisson[i];
46 ofs = vec2(dot(ofs, basis.xz), dot(ofs, basis.yw)); 47 ofs = vec2(dot(ofs, basis.xz), dot(ofs, basis.yw));
47 48
48 vec2 texcoord = UV + max_siz * ofs / vec2(1024.0,768.0); 49 vec2 texcoord = UV + max_siz * ofs / resolution;
49 sum += texture(screenTex, texcoord, -10.0); 50 sum += texture(screenTex, texcoord, -10.0);
50 } 51 }
51 52