|
@@ -3181,7 +3181,10 @@ class WebGLRenderTarget extends EventDispatcher {
|
|
|
this.viewport.copy( source.viewport );
|
|
|
|
|
|
this.texture = source.texture.clone();
|
|
|
- this.texture.image = { ...this.texture.image }; // See #20328.
|
|
|
+
|
|
|
+ // ensure image object is not shared, see #20328
|
|
|
+
|
|
|
+ this.texture.image = Object.assign( {}, source.texture.image );
|
|
|
|
|
|
this.depthBuffer = source.depthBuffer;
|
|
|
this.stencilBuffer = source.stencilBuffer;
|
|
@@ -13662,10 +13665,10 @@ ShaderLib.physical = {
|
|
|
|
|
|
};
|
|
|
|
|
|
-function WebGLBackground( renderer, cubemaps, state, objects, premultipliedAlpha ) {
|
|
|
+function WebGLBackground( renderer, cubemaps, state, objects, alpha, premultipliedAlpha ) {
|
|
|
|
|
|
const clearColor = new Color( 0x000000 );
|
|
|
- let clearAlpha = 0;
|
|
|
+ let clearAlpha = alpha === true ? 0 : 1;
|
|
|
|
|
|
let planeMesh;
|
|
|
let boxMesh;
|
|
@@ -26005,7 +26008,7 @@ function WebGLRenderer( parameters = {} ) {
|
|
|
try {
|
|
|
|
|
|
const contextAttributes = {
|
|
|
- alpha: _alpha,
|
|
|
+ alpha: true,
|
|
|
depth: _depth,
|
|
|
stencil: _stencil,
|
|
|
antialias: _antialias,
|
|
@@ -26104,7 +26107,7 @@ function WebGLRenderer( parameters = {} ) {
|
|
|
materials = new WebGLMaterials( properties );
|
|
|
renderLists = new WebGLRenderLists();
|
|
|
renderStates = new WebGLRenderStates( extensions, capabilities );
|
|
|
- background = new WebGLBackground( _this, cubemaps, state, objects, _premultipliedAlpha );
|
|
|
+ background = new WebGLBackground( _this, cubemaps, state, objects, _alpha, _premultipliedAlpha );
|
|
|
shadowMap = new WebGLShadowMap( _this, objects, capabilities );
|
|
|
|
|
|
bufferRenderer = new WebGLBufferRenderer( _gl, extensions, info, capabilities );
|