Browse Source

Merge pull request #21362 from Mugen87/dev51

WebGLRenderer: Move invocation of Scene.onAfterRender().
Mr.doob 4 years ago
parent
commit
33e0a8639b
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/renderers/WebGLRenderer.js

+ 4 - 4
src/renderers/WebGLRenderer.js

@@ -1076,10 +1076,6 @@ function WebGLRenderer( parameters ) {
 
 		//
 
-		if ( scene.isScene === true ) scene.onAfterRender( _this, scene, camera );
-
-		//
-
 		if ( _currentRenderTarget !== null ) {
 
 			// Generate mipmap if we're using any kind of mipmap filtering
@@ -1092,6 +1088,10 @@ function WebGLRenderer( parameters ) {
 
 		}
 
+		//
+
+		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 );