Prechádzať zdrojové kódy

Examples: Fix onWindowResize() in webgl_postprocessing_dof2

Mugen87 6 rokov pred
rodič
commit
537b37bb54
1 zmenil súbory, kde vykonal 9 pridanie a 0 odobranie
  1. 9 0
      examples/webgl_postprocessing_dof2.html

+ 9 - 0
examples/webgl_postprocessing_dof2.html

@@ -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 );
 
 			}