When I use the BokehPass (GitHub source) like the one used in the DoF example (three.js examples), I don’t know how I can set the correct render target size when I resize the window.
The example doesn’t use a resize handler at all but when I try to implement it, it’s still wrong when I do
renderer.setSize(innerWidth, innerHeight);
composer.setSize(innerWidth, innerHeight);
I also tried to reset the composer or to setSize()
on the render target of the composer to no use.
The BokehPass.js
implements a function setSize()
but it doesn’t do all the things necessary in the shader I think.