@@ -314,8 +314,6 @@ class Renderer {
314
314
*/
315
315
this . _scissor = new Vector4 ( 0 , 0 , this . _width , this . _height ) ;
316
316
317
- this . _forceViewport = false ;
318
-
319
317
/**
320
318
* Whether the scissor test should be enabled or not.
321
319
*
@@ -1245,7 +1243,16 @@ class Renderer {
1245
1243
1246
1244
frameBufferTarget . depthBuffer = depth ;
1247
1245
frameBufferTarget . stencilBuffer = stencil ;
1248
- frameBufferTarget . setSize ( width , height , outputRenderTarget !== null ? outputRenderTarget . depth : 1 ) ;
1246
+ if ( outputRenderTarget !== null ) {
1247
+
1248
+ frameBufferTarget . setSize ( outputRenderTarget . width , outputRenderTarget . height , outputRenderTarget . depth ) ;
1249
+
1250
+ } else {
1251
+
1252
+ frameBufferTarget . setSize ( width , height , 1 ) ;
1253
+
1254
+ }
1255
+
1249
1256
frameBufferTarget . viewport . copy ( this . _viewport ) ;
1250
1257
frameBufferTarget . scissor . copy ( this . _scissor ) ;
1251
1258
frameBufferTarget . viewport . multiplyScalar ( this . _pixelRatio ) ;
@@ -1383,7 +1390,7 @@ class Renderer {
1383
1390
renderContext . viewportValue . height >>= activeMipmapLevel ;
1384
1391
renderContext . viewportValue . minDepth = minDepth ;
1385
1392
renderContext . viewportValue . maxDepth = maxDepth ;
1386
- renderContext . viewport = renderContext . viewportValue . equals ( _screen ) === false || this . _forceViewport ;
1393
+ renderContext . viewport = renderContext . viewportValue . equals ( _screen ) === false ;
1387
1394
1388
1395
renderContext . scissorValue . copy ( scissor ) . multiplyScalar ( pixelRatio ) . floor ( ) ;
1389
1396
renderContext . scissor = this . _scissorTest && renderContext . scissorValue . equals ( _screen ) === false ;
@@ -1513,8 +1520,6 @@ class Renderer {
1513
1520
this . _width = width ;
1514
1521
this . _height = height ;
1515
1522
1516
- this . _forceViewport = true ;
1517
-
1518
1523
this . setViewport ( 0 , 0 , width , height ) ;
1519
1524
1520
1525
}
@@ -1702,7 +1707,6 @@ class Renderer {
1702
1707
1703
1708
this . domElement . width = Math . floor ( width * pixelRatio ) ;
1704
1709
this . domElement . height = Math . floor ( height * pixelRatio ) ;
1705
- this . _forceViewport = false ;
1706
1710
1707
1711
this . setViewport ( 0 , 0 , width , height ) ;
1708
1712
@@ -1728,8 +1732,6 @@ class Renderer {
1728
1732
this . domElement . width = Math . floor ( width * this . _pixelRatio ) ;
1729
1733
this . domElement . height = Math . floor ( height * this . _pixelRatio ) ;
1730
1734
1731
- this . _forceViewport = false ;
1732
-
1733
1735
if ( updateStyle === true ) {
1734
1736
1735
1737
this . domElement . style . width = width + 'px' ;
0 commit comments