From 3ca3fb399f24e16788cc1cfd391c234dc69fc183 Mon Sep 17 00:00:00 2001 From: aardgoose Date: Thu, 8 Feb 2024 11:41:52 +0000 Subject: [PATCH] fix asyncCompile --- examples/jsm/renderers/common/Renderer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/jsm/renderers/common/Renderer.js b/examples/jsm/renderers/common/Renderer.js index 19f4317af18634..0c7c8a05195565 100644 --- a/examples/jsm/renderers/common/Renderer.js +++ b/examples/jsm/renderers/common/Renderer.js @@ -227,6 +227,9 @@ class Renderer { renderContext.depth = this.depth; renderContext.stencil = this.stencil; + if ( ! renderContext.clippingContext ) renderContext.clippingContext = new ClippingContext(); + renderContext.clippingContext.updateGlobal( this, camera ); + // sceneRef.onBeforeRender( this, scene, camera, renderTarget ); @@ -1223,7 +1226,7 @@ class Renderer { _createObjectPipeline( object, material, scene, camera, lightsNode, passId ) { - const renderObject = this._objects.get( object, material, scene, camera, lightsNode, this._currentRenderContext, this._clippingContext, passId ); + const renderObject = this._objects.get( object, material, scene, camera, lightsNode, this._currentRenderContext, passId ); //