Downsample when blurring bloom

This commit is contained in:
jgk
2021-08-20 04:14:59 +02:00
parent 6933d610cd
commit 3707716569
4 changed files with 25 additions and 16 deletions
+4 -2
View File
@@ -3,10 +3,12 @@ in vec2 vTexPos;
out vec4 fColor;
const vec2 winSize = vec2 (300,300);
// note that the above opening bracket should be the first in this file
// this is so that the window size can be extracted and the shader recompiled on
// the fly
uniform sampler2D screenTexture;
const float hOff = 4.0 / winSize.x;
const float vOff = 4.0 / winSize.y;
const float hOff = 3.0 / winSize.x;
const float vOff = 3.0 / winSize.y;
const float frac = 1.0 / 9;
const vec2 off[9] = vec2[]
( vec2( vOff,hOff )