Skip to content

Commit cb8a1da

Browse files
authored
Set near plane >= 0 (#31912)
1 parent 3c32743 commit cb8a1da

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

examples/webgl_postprocessing_dof2.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,8 @@
322322

323323
postprocessing.scene = new THREE.Scene();
324324

325-
postprocessing.camera = new THREE.OrthographicCamera( window.innerWidth / - 2, window.innerWidth / 2, window.innerHeight / 2, window.innerHeight / - 2, - 10000, 10000 );
326-
postprocessing.camera.position.z = 100;
325+
postprocessing.camera = new THREE.OrthographicCamera( window.innerWidth / - 2, window.innerWidth / 2, window.innerHeight / 2, window.innerHeight / - 2, 1, 10 );
326+
postprocessing.camera.position.z = 2;
327327

328328
postprocessing.scene.add( postprocessing.camera );
329329

@@ -352,7 +352,6 @@
352352
} );
353353

354354
postprocessing.quad = new THREE.Mesh( new THREE.PlaneGeometry( window.innerWidth, window.innerHeight ), postprocessing.materialBokeh );
355-
postprocessing.quad.position.z = - 500;
356355
postprocessing.scene.add( postprocessing.quad );
357356

358357
}

examples/webgl_read_float_buffer.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@
9494

9595
container = document.getElementById( 'container' );
9696

97-
cameraRTT = new THREE.OrthographicCamera( window.innerWidth / - 2, window.innerWidth / 2, window.innerHeight / 2, window.innerHeight / - 2, - 10000, 10000 );
98-
cameraRTT.position.z = 100;
97+
cameraRTT = new THREE.OrthographicCamera( window.innerWidth / - 2, window.innerWidth / 2, window.innerHeight / 2, window.innerHeight / - 2, 1, 1000 );
98+
cameraRTT.position.z = 500;
9999

100100
//
101101

examples/webgl_rtt.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@
9393
camera = new THREE.PerspectiveCamera( 30, window.innerWidth / window.innerHeight, 1, 10000 );
9494
camera.position.z = 100;
9595

96-
cameraRTT = new THREE.OrthographicCamera( window.innerWidth / - 2, window.innerWidth / 2, window.innerHeight / 2, window.innerHeight / - 2, - 10000, 10000 );
97-
cameraRTT.position.z = 100;
96+
cameraRTT = new THREE.OrthographicCamera( window.innerWidth / - 2, window.innerWidth / 2, window.innerHeight / 2, window.innerHeight / - 2, 1, 1000 );
97+
cameraRTT.position.z = 500;
9898

9999
//
100100

0 commit comments

Comments
 (0)