Explorar o código

Merge pull request #16020 from Mugen87/dev26

WebGLRenderer: Ensure buffers are not overwritten by Scene.onAfterRender().
Mr.doob %!s(int64=6) %!d(string=hai) anos
pai
achega
728f241c89
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  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 ) {
 
 			// Generate mipmap if we're using any kind of mipmap filtering
@@ -1225,8 +1229,6 @@ function WebGLRenderer( parameters ) {
 
 		state.setPolygonOffset( false );
 
-		scene.onAfterRender( _this, scene, camera );
-
 		if ( vr.enabled ) {
 
 			vr.submitFrame();