I cannot work out why my blur shader based on this example affects only what's inside the illuminated sphere. Below is the loop I'm using to blur an HDR framebuffer 5 times horizontally and vertically
for(let i = 0; i!=5; i++){
gl.bindFramebuffer(gl.FRAMEBUFFER,BlurFBOH);
gl.viewport(0,0,canvas.width,canvas.height);
gl.clearColor(0,0,0,1);
gl.clear(gl.COLOR_BUFFER_BIT|gl.DEPTH_BUFFER_BIT);
setUniformInt(BlurShader,"HV",1);
if (iteration == 0) {
gl.bindTexture(gl.TEXTURE_2D, HDRTex);
}
else {
gl.bindTexture(gl.TEXTURE_2D,blurredTexV);
}
renderQuad(BlurShader,quadVAO,ID,ID,ID);
gl.bindFramebuffer(gl.FRAMEBUFFER,null);
gl.bindFramebuffer(gl.FRAMEBUFFER,BlurFBOV);
gl.viewport(0,0,canvas.width,canvas.height);
gl.clearColor(0,0,0,1);
gl.clear(gl.COLOR_BUFFER_BIT|gl.DEPTH_BUFFER_BIT);
setUniformInt(BlurShader,"HV",0);
gl.bindTexture(gl.TEXTURE_2D,blurredTexH);
renderQuad(BlurShader,quadVAO,ID,ID,ID);
gl.bindFramebuffer(gl.FRAMEBUFFER,null);
iteration++;
}