diff options
Diffstat (limited to 'shaders/bloom1.fragment')
-rw-r--r-- | shaders/bloom1.fragment | 3 |
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 | ||
7 | uniform sampler2D screenTex; | 7 | uniform sampler2D screenTex; |
8 | uniform float iGlobalTime; | 8 | uniform float iGlobalTime; |
9 | uniform vec2 resolution; | ||
9 | 10 | ||
10 | float nrand(vec2 n) | 11 | float 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 | ||