|
@@ -265,23 +265,21 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
var backgroundCamera2 = new THREE.PerspectiveCamera();
|
|
|
var backgroundPlaneMesh = new THREE.Mesh(
|
|
|
new THREE.PlaneBufferGeometry( 2, 2 ),
|
|
|
- new THREE.MeshBasicMaterial( { depthTest: false, depthWrite: false } )
|
|
|
+ new THREE.MeshBasicMaterial( { depthTest: false, depthWrite: false, fog: false } )
|
|
|
);
|
|
|
var backgroundBoxShader = THREE.ShaderLib[ 'cube' ];
|
|
|
- var backgroundBoxSubdiv = capabilities.logarithmicDepthBuffer ? 4 : 1; // Workaround for logarithmicDepthBuffer #9235
|
|
|
var backgroundBoxMesh = new THREE.Mesh(
|
|
|
- new THREE.BoxBufferGeometry( 5, 5, 5, backgroundBoxSubdiv, backgroundBoxSubdiv, backgroundBoxSubdiv ),
|
|
|
+ new THREE.BoxBufferGeometry( 5, 5, 5, 2, 2, 2 ),
|
|
|
new THREE.ShaderMaterial( {
|
|
|
uniforms: backgroundBoxShader.uniforms,
|
|
|
vertexShader: backgroundBoxShader.vertexShader,
|
|
|
fragmentShader: backgroundBoxShader.fragmentShader,
|
|
|
+ side: THREE.BackSide,
|
|
|
depthTest: false,
|
|
|
depthWrite: false,
|
|
|
- side: THREE.BackSide
|
|
|
+ fog: false
|
|
|
} )
|
|
|
);
|
|
|
- objects.update( backgroundPlaneMesh );
|
|
|
- objects.update( backgroundBoxMesh );
|
|
|
|
|
|
//
|
|
|
|
|
@@ -1193,12 +1191,16 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
backgroundBoxMesh.material.uniforms[ "tCube" ].value = background;
|
|
|
backgroundBoxMesh.modelViewMatrix.multiplyMatrices( backgroundCamera2.matrixWorldInverse, backgroundBoxMesh.matrixWorld );
|
|
|
|
|
|
+ objects.update( backgroundBoxMesh );
|
|
|
+
|
|
|
_this.renderBufferDirect( backgroundCamera2, null, backgroundBoxMesh.geometry, backgroundBoxMesh.material, backgroundBoxMesh, null );
|
|
|
|
|
|
} else if ( background instanceof THREE.Texture ) {
|
|
|
|
|
|
backgroundPlaneMesh.material.map = background;
|
|
|
|
|
|
+ objects.update( backgroundPlaneMesh );
|
|
|
+
|
|
|
_this.renderBufferDirect( backgroundCamera, null, backgroundPlaneMesh.geometry, backgroundPlaneMesh.material, backgroundPlaneMesh, null );
|
|
|
|
|
|
}
|