|
@@ -29,16 +29,16 @@ THREE.RenderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype
|
|
|
var oldAutoClear = renderer.autoClear;
|
|
|
renderer.autoClear = false;
|
|
|
|
|
|
- var oldOverrideMaterial = this.scene.overrideMaterial;
|
|
|
+ var oldClearColor, oldClearAlpha, oldOverrideMaterial;
|
|
|
|
|
|
if ( this.overrideMaterial !== undefined ) {
|
|
|
|
|
|
+ oldOverrideMaterial = this.scene.overrideMaterial;
|
|
|
+
|
|
|
this.scene.overrideMaterial = this.overrideMaterial;
|
|
|
|
|
|
}
|
|
|
|
|
|
- var oldClearColor, oldClearAlpha;
|
|
|
-
|
|
|
if ( this.clearColor ) {
|
|
|
|
|
|
oldClearColor = renderer.getClearColor().getHex();
|
|
@@ -66,7 +66,12 @@ THREE.RenderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype
|
|
|
|
|
|
}
|
|
|
|
|
|
- this.scene.overrideMaterial = oldOverrideMaterial;
|
|
|
+ if ( this.overrideMaterial !== undefined ) {
|
|
|
+
|
|
|
+ this.scene.overrideMaterial = oldOverrideMaterial;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
renderer.autoClear = oldAutoClear;
|
|
|
|
|
|
}
|