summary refs log tree commit diff stats
path: root/shaders/bloom2.fragment
diff options
context:
space:
mode:
Diffstat (limited to 'shaders/bloom2.fragment')
-rw-r--r--shaders/bloom2.fragment3
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;
7uniform sampler2D screenTex; 7uniform sampler2D screenTex;
8uniform sampler2D downsampledTex; 8uniform sampler2D downsampledTex;
9uniform float iGlobalTime; 9uniform float iGlobalTime;
10uniform vec2 resolution;
10 11
11float nrand(vec2 n) 12float 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