Safari 15.4 Beta issue combining UtilityLayerRenderer and DefaultRenderingPipeline

Using BabylonJS v4.2.1, I am seeing a rendering issue on iOS Safari 15.4 Beta 5 on an iPad Pro when adding both a UtilityLayerRenderer and DefaultRenderingPipeline. The issue does not appear in the latest 5.0.0 of BabylonJS, or on my desktop non-beta version of Safari.

My project resembles a simple model viewer with a rotatable camera, so I have been able to recreate the issue in the default Babylon Playground example. You can view my example code here:

I have boiled the offending code down to 3 lines of code. When trying to rotate the camera using touch, the scene is not updated, though the code does reach the render loop every frame. I have commented directions in the code to get the scene working as expected, but the issue seems to present itself with some combination of UtilityLayerRenderer and DefaultRenderingPipeline with HDR textures enabled and a pipeline sampling value greater than 1.

I have also include the snippet below for reference:

    // For BabylonJS v4.2.1 on iOS Safari 15.4 Beta 5 on an iPad Pro, I am witnessing a render issue.
    // This example prevents rendering updates when attempting to rotate the camera in the Babylon basic demo.
    // I have stripped down my code to the below 3 offending lines.
    // To fix this example, you can perform any one of the below methods:
    // 1. comment out the utilLayer line
    // 2. change true to false in the pipeline instance
    // 3. change pipeline.samples to 1 (anything > 1 fails)
    const utilLayer = new BABYLON.UtilityLayerRenderer(scene);
    const pipeline = new BABYLON.DefaultRenderingPipeline("default", true, scene, [camera]);
    pipeline.samples = 8;

The problem also does not surface if I disable WebGL 2.0 in WebKit Experimental Features.

Thank you.

We will release 5.0 really soon and won t back port the fix in 4.2.1 as there is a lot of changes related to the pipeline in 5. Could you start using 5.0 RC instead ?

We cannot short term. Is there a small patch taht we can do to fix temporarily? We are open to hacking sometihng into a fork as needed.

I do not think there is a short/small fix unfortunately … as this has been an ongoing effort in 5 I would recommand to disable pipeline.samples and relying on FXAA on those devices.

Thanks! We will upgrade to babylon 5.0 as soon as possible and in the short term turn off MSAA on ios 15.4. thank you.