From 6be05e45517f39c5a71117238232201df3f36713 Mon Sep 17 00:00:00 2001 From: Michael Herzog Date: Mon, 20 May 2024 21:59:25 +0200 Subject: [PATCH] WebGLRenderer: Ensure correct clear after transmission. (#28445) --- src/renderers/WebGLRenderer.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/renderers/WebGLRenderer.js b/src/renderers/WebGLRenderer.js index 4aa71775b99f2f..4e07990135330d 100644 --- a/src/renderers/WebGLRenderer.js +++ b/src/renderers/WebGLRenderer.js @@ -1533,6 +1533,12 @@ class WebGLRenderer { _this.toneMapping = currentToneMapping; + // buffers might not be writable after rendering transmission which is required to ensure a correct clear + + state.buffers.depth.setTest( true ); + state.buffers.depth.setMask( true ); + state.buffers.color.setMask( true ); + } function renderObjects( renderList, scene, camera ) {