BabylonJS (5.0 - 5.5.5) & iOS 15.4 + Safari 15.4 issues

Ok, so back at it again.

I just noticed that taking a screenshot with Tools.CreateScreenshotUsingRenderTarget does not work.
And this error is only happening if SSAO2 is enabled.

Please take a look at the following playground and let me know if this bug can be soon fixed or if there is a workaround to it.
https://playground.babylonjs.com/#7D2QDD#32

Thanks.

I do not think the pipeline can be used on renderTarget, can you change the canvas size, use createScreenShot instead ?

cc @CraigFeldspar in case he knows why we can not use it in RTT ?

Thank you for your response.

Ok, but why can the pipeline be used on renderTarget on BabylonJS version < 5.0 and not on BabylonJS version > 5.0?

On the playground example that I posted above you can just switch the Babylon version to 4.2.1 and you will see that the pipeline can actually be used on renderTarget. Meaning that the screenshot gets generated with SSAO2 just fine.

Thank you, and I hope there is a solution for this.

Screenshot tools directly call render on the RTT without the prepass textures being rendered. Outside of the normal scene.render pipeline, prepass can have an undefined behavior.
4.2.1 version of babylon uses the geometrybufferrenderer, so if you want to replicate that behavior, use @sebavan’s suggestion :
BABYLON.SSAO2RenderingPipeline("ssao", scene, ssaoRatio, undefined, true);

Actually it works just fine.

Thank you. :slightly_smiling_face:

Hi again @sebavan @CraigFeldspar,

I had to test again on the matter of SSAO2 and taking a screenshot with it and finally noticed where the issue stands.

I have created two playgrounds, one with the Babylon version 4.2.1 and the other with the latest Babylon which produces the issue.

Now, I just take a screenshot with SSAO2 enabled using Babylon 4.2.1 and everything works fine:
https://playground.babylonjs.com/#7D2QDD#44

But, when I take the screenshot with SSAO2 enabled using a Babylon version > 5.0 I get this:
https://playground.babylonjs.com/#7D2QDD#43

The SSAO2 doesn’t look right with Babylon version > 5.0.

And what i noticed is that this only happens when the screenshot resolution is defined on Babylon > 5.0.
If you remove the defined resolution on the Tools.CreateScreenshotUsingRenderTarget() the SSO2 will look fine on Babylon > 5.0 too.

Is it possible to make this work with any defined resolution? It would really help us in generating screenshots with any resolution we need.

Thank you, and I hope there is a solution for it soon. :slightly_smiling_face:

Regards,
Gerald

cc @CraigFeldspar can you please have a look as soon as you can?

thanks a ton!

1 Like

Hi guys,

Is there any update on this issue?

Thanks a lot. :slightly_smiling_face:

Hi,

If helps, I opened both PGs and the snapshots taken looks equal. I used Win11 and Edge to do it.

@NRA its still broken compared to v4.2.1.
You may need to switch to Babylon version 4.2.1 to see that the screenshots aren’t equal.

@Gerald

Sorry, you are right!

@NRA Let’s hope it will be fixed. :grin:

1 Like

Adding a few folks as @CraigFeldspar may be on vacation
@sebavan (on vacation but will be back in a week) @Evgeni_Popov (on vacation too)

Please be a bit more patient than usual as almost everyone is enjoying summer time :wink:

1 Like

Enjoy your vacation guys. :smiley:

Just let us know after that is hopefully fixed. :slightly_smiling_face:

This PR will fix the problem:

4 Likes

So glad you already found it !!! Thanks a ton @Evgeni_Popov

1 Like

Also back from off time, thanks @Evgeni_Popov ! good catch

1 Like