|
@@ -26559,13 +26559,13 @@ function WebGLRenderer( parameters = {} ) {
|
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
- this.clear = function ( color, depth, stencil ) {
|
|
|
|
|
|
+ this.clear = function ( color = true, depth = true, stencil = true ) {
|
|
|
|
|
|
let bits = 0;
|
|
let bits = 0;
|
|
|
|
|
|
- if ( color === undefined || color ) bits |= 16384;
|
|
|
|
- if ( depth === undefined || depth ) bits |= 256;
|
|
|
|
- if ( stencil === undefined || stencil ) bits |= 1024;
|
|
|
|
|
|
+ if ( color ) bits |= 16384;
|
|
|
|
+ if ( depth ) bits |= 256;
|
|
|
|
+ if ( stencil ) bits |= 1024;
|
|
|
|
|
|
_gl.clear( bits );
|
|
_gl.clear( bits );
|
|
|
|
|
|
@@ -27047,14 +27047,6 @@ function WebGLRenderer( parameters = {} ) {
|
|
|
|
|
|
if ( scene.isScene === true ) scene.onAfterRender( _this, scene, camera );
|
|
if ( scene.isScene === true ) scene.onAfterRender( _this, scene, camera );
|
|
|
|
|
|
- // Ensure depth buffer writing is enabled so it can be cleared on next render
|
|
|
|
-
|
|
|
|
- state.buffers.depth.setTest( true );
|
|
|
|
- state.buffers.depth.setMask( true );
|
|
|
|
- state.buffers.color.setMask( true );
|
|
|
|
-
|
|
|
|
- state.setPolygonOffset( false );
|
|
|
|
-
|
|
|
|
// _gl.finish();
|
|
// _gl.finish();
|
|
|
|
|
|
bindingStates.resetDefaultState();
|
|
bindingStates.resetDefaultState();
|
|
@@ -27217,6 +27209,14 @@ function WebGLRenderer( parameters = {} ) {
|
|
if ( transmissiveObjects.length > 0 ) renderObjects( transmissiveObjects, scene, camera );
|
|
if ( transmissiveObjects.length > 0 ) renderObjects( transmissiveObjects, scene, camera );
|
|
if ( transparentObjects.length > 0 ) renderObjects( transparentObjects, scene, camera );
|
|
if ( transparentObjects.length > 0 ) renderObjects( transparentObjects, scene, camera );
|
|
|
|
|
|
|
|
+ // Ensure depth buffer writing is enabled so it can be cleared on next render
|
|
|
|
+
|
|
|
|
+ state.buffers.depth.setTest( true );
|
|
|
|
+ state.buffers.depth.setMask( true );
|
|
|
|
+ state.buffers.color.setMask( true );
|
|
|
|
+
|
|
|
|
+ state.setPolygonOffset( false );
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
function renderTransmissionPass( opaqueObjects, scene, camera ) {
|
|
function renderTransmissionPass( opaqueObjects, scene, camera ) {
|
|
@@ -27858,6 +27858,7 @@ function WebGLRenderer( parameters = {} ) {
|
|
_currentRenderTarget = renderTarget;
|
|
_currentRenderTarget = renderTarget;
|
|
_currentActiveCubeFace = activeCubeFace;
|
|
_currentActiveCubeFace = activeCubeFace;
|
|
_currentActiveMipmapLevel = activeMipmapLevel;
|
|
_currentActiveMipmapLevel = activeMipmapLevel;
|
|
|
|
+
|
|
let useDefaultFramebuffer = true;
|
|
let useDefaultFramebuffer = true;
|
|
|
|
|
|
if ( renderTarget ) {
|
|
if ( renderTarget ) {
|