@@ -52,7 +52,7 @@ import { WebGLUtils } from './webgl/WebGLUtils.js';
52
52
import { WebXRManager } from './webxr/WebXRManager.js' ;
53
53
import { WebGLMaterials } from './webgl/WebGLMaterials.js' ;
54
54
import { WebGLUniformsGroups } from './webgl/WebGLUniformsGroups.js' ;
55
- import { createCanvasElement , probeAsync , toNormalizedProjectionMatrix , toReversedProjectionMatrix , warnOnce } from '../utils.js' ;
55
+ import { createCanvasElement , probeAsync , warnOnce } from '../utils.js' ;
56
56
import { ColorManagement } from '../math/ColorManagement.js' ;
57
57
58
58
/**
@@ -313,7 +313,6 @@ class WebGLRenderer {
313
313
314
314
// camera matrices cache
315
315
316
- const _currentProjectionMatrix = new Matrix4 ( ) ;
317
316
const _projScreenMatrix = new Matrix4 ( ) ;
318
317
319
318
const _vector3 = new Vector3 ( ) ;
@@ -2384,22 +2383,13 @@ class WebGLRenderer {
2384
2383
2385
2384
if ( reversedDepthBuffer && camera . reversedDepth !== true ) {
2386
2385
2387
- // @deprecated , r179
2388
- warnOnce ( 'THREE.WebGLRenderer: reversedDepthBuffer must be used with "camera.reversedDepth = true;" for correct results. Automatic conversion will be removed in r189.' ) ;
2389
-
2390
- _currentProjectionMatrix . copy ( camera . projectionMatrix ) ;
2391
-
2392
- toNormalizedProjectionMatrix ( _currentProjectionMatrix ) ;
2393
- toReversedProjectionMatrix ( _currentProjectionMatrix ) ;
2394
-
2395
- p_uniforms . setValue ( _gl , 'projectionMatrix' , _currentProjectionMatrix ) ;
2396
-
2397
- } else {
2398
-
2399
- p_uniforms . setValue ( _gl , 'projectionMatrix' , camera . projectionMatrix ) ;
2386
+ camera . reversedDepth = true ;
2387
+ camera . updateProjectionMatrix ( ) ;
2400
2388
2401
2389
}
2402
2390
2391
+ p_uniforms . setValue ( _gl , 'projectionMatrix' , camera . projectionMatrix ) ;
2392
+
2403
2393
p_uniforms . setValue ( _gl , 'viewMatrix' , camera . matrixWorldInverse ) ;
2404
2394
2405
2395
const uCamPos = p_uniforms . map . cameraPosition ;
0 commit comments