Skip to content

Commit

Permalink
Examples: Fix onWindowResize() in webgl_postprocessing_dof2
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 committed Mar 1, 2019
1 parent 6e125df commit 537b37b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/webgl_postprocessing_dof2.html
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,15 @@
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();

windowHalfX = window.innerWidth / 2;
windowHalfY = window.innerHeight / 2;

postprocessing.rtTextureDepth.setSize( window.innerWidth, window.innerHeight );
postprocessing.rtTextureColor.setSize( window.innerWidth, window.innerHeight );

postprocessing.bokeh_uniforms[ 'textureWidth' ].value = window.innerWidth;
postprocessing.bokeh_uniforms[ 'textureHeight' ].value = window.innerHeight;

renderer.setSize( window.innerWidth, window.innerHeight );

}
Expand Down

0 comments on commit 537b37b

Please sign in to comment.