|
@@ -39,6 +39,7 @@ THREE.WebGLDeferredRenderer = function ( parameters ) {
|
|
|
//
|
|
|
|
|
|
var currentCamera = null;
|
|
|
+ var projectionMatrixInverse = new THREE.Matrix4();
|
|
|
|
|
|
var positionVS = new THREE.Vector3();
|
|
|
var directionVS = new THREE.Vector3();
|
|
@@ -932,7 +933,7 @@ THREE.WebGLDeferredRenderer = function ( parameters ) {
|
|
|
|
|
|
var uniforms = proxy.material.uniforms;
|
|
|
|
|
|
- if ( uniforms[ "matProjInverse" ] ) uniforms[ "matProjInverse" ].value = currentCamera.projectionMatrixInverse;
|
|
|
+ if ( uniforms[ "matProjInverse" ] ) uniforms[ "matProjInverse" ].value = projectionMatrixInverse;
|
|
|
if ( uniforms[ "matView" ] ) uniforms[ "matView" ].value = currentCamera.matrixWorldInverse;
|
|
|
|
|
|
var originalLight = proxy.userData.originalLight;
|
|
@@ -1055,7 +1056,7 @@ THREE.WebGLDeferredRenderer = function ( parameters ) {
|
|
|
|
|
|
gl.depthFunc( gl.GEQUAL );
|
|
|
|
|
|
- currentCamera.projectionMatrixInverse.getInverse( currentCamera.projectionMatrix );
|
|
|
+ projectionMatrixInverse.getInverse( currentCamera.projectionMatrix );
|
|
|
|
|
|
for ( var i = 0, il = lightSceneProxy.children.length; i < il; i ++ ) {
|
|
|
|