Ver Fonte

Merge pull request #16020 from Mugen87/dev26

WebGLRenderer: Ensure buffers are not overwritten by Scene.onAfterRender().
Mr.doob há 6 anos atrás
pai
commit
728f241c89
1 ficheiros alterados com 4 adições e 2 exclusões
  1. 4 2
      src/renderers/WebGLRenderer.js

+ 4 - 2
src/renderers/WebGLRenderer.js

@@ -1205,6 +1205,10 @@ function WebGLRenderer( parameters ) {
 
 
 		//
 		//
 
 
+		scene.onAfterRender( _this, scene, camera );
+
+		//
+
 		if ( _currentRenderTarget !== null ) {
 		if ( _currentRenderTarget !== null ) {
 
 
 			// Generate mipmap if we're using any kind of mipmap filtering
 			// Generate mipmap if we're using any kind of mipmap filtering
@@ -1225,8 +1229,6 @@ function WebGLRenderer( parameters ) {
 
 
 		state.setPolygonOffset( false );
 		state.setPolygonOffset( false );
 
 
-		scene.onAfterRender( _this, scene, camera );
-
 		if ( vr.enabled ) {
 		if ( vr.enabled ) {
 
 
 			vr.submitFrame();
 			vr.submitFrame();