From 84edf4902e6d3579d18360a263947569c33a6fe7 Mon Sep 17 00:00:00 2001 From: Renaud Rohlinger Date: Fri, 27 May 2022 09:28:50 +0900 Subject: [PATCH 1/2] WebGLMultipleRenderTargets: Example fix iOS with MSAA There is another issue only on iOS, some texture types will break in certain cases. I don't have an explanation of the why, I think it's just a bug. Also, there was an issue with Safari which was fixed in the latest version (15.5) where it was required to clear the canvas before rendering the scene. I only added comments since this issue has been patched, should we add it anyway? --- examples/webgl2_multiple_rendertargets.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/webgl2_multiple_rendertargets.html b/examples/webgl2_multiple_rendertargets.html index db8faaa0670a88..4cb91b758f9e96 100644 --- a/examples/webgl2_multiple_rendertargets.html +++ b/examples/webgl2_multiple_rendertargets.html @@ -164,7 +164,6 @@ renderTarget.texture[ i ].minFilter = THREE.NearestFilter; renderTarget.texture[ i ].magFilter = THREE.NearestFilter; - renderTarget.texture[ i ].type = THREE.FloatType; } @@ -246,6 +245,13 @@ renderTarget.samples = parameters.samples; + // safari prior 15.5 needs the renderer to be cleared() + // if ( parameters.samples > 0 ) { + + // renderer.clear(); + + // } + scene.traverse( function ( child ) { if ( child.material !== undefined ) { From 95c85b7c5b49fdffcba475199bf4ca16dd0dc89c Mon Sep 17 00:00:00 2001 From: Renaud Rohlinger Date: Sat, 28 May 2022 09:18:21 +0900 Subject: [PATCH 2/2] Update webgl2_multiple_rendertargets.html --- examples/webgl2_multiple_rendertargets.html | 7 ------- 1 file changed, 7 deletions(-) diff --git a/examples/webgl2_multiple_rendertargets.html b/examples/webgl2_multiple_rendertargets.html index 4cb91b758f9e96..2bf67b0c001cf9 100644 --- a/examples/webgl2_multiple_rendertargets.html +++ b/examples/webgl2_multiple_rendertargets.html @@ -245,13 +245,6 @@ renderTarget.samples = parameters.samples; - // safari prior 15.5 needs the renderer to be cleared() - // if ( parameters.samples > 0 ) { - - // renderer.clear(); - - // } - scene.traverse( function ( child ) { if ( child.material !== undefined ) {