Is it a MultiRendertarget bug on mac

Hi, i’m creating a MRT render target to do some post effects, everything is fine on windows and ubuntu, but when i open that page on mac, only the first attached frame buffer texture is rendered while the others are all empty, and the rendering result in the first attached frame buffer texture is also somewhat wrong. I tried to set the MRT texture number to 1, any the result in attached frame buffer texture is then right.

PS: All the browser is chrome 79.

Any error in the console? A link to a repro in the PG could help as well

I make a PG to illustrate what we did
in our application, the results of the MRT is then used in the next pass as input textures.

Pingin @sebavan

It works for me on Chrome for Mac:

It does not on Safari cause you are using WebGL 2 syntax which Safari does not support and their preview support is still not good enough ton support it.

Would you happen to have more info to repro ? I am on Mac with Chrome 79 as well.

Could you share the PG to display this please? I need to figure out where we might go wrong on the next pass, thank you!

This is using the playground you shared:

My playground does not display any thing in the final screen because all the things is rendered into the MRT not the main framebuffer. Do you add some code to display it on the main screen?

No, I thought that was the repro and it should not work…

Could you create an easy repro where it would be easy to spot what is wrong ? Then I ll try to fix it ASAP.

it seems in PG the compiler is always webgl1? the browser told me "Error: VERTEX SHADER ERROR: 0:4: ‘version’ : #version directive must occur before anything else, except for comments and white "

and here is my repro but could not run in PG for the webgl1 environment.

In PG it is webgl2 if supported else webgl1 so your device / browser might not support it.

I can not use your repro as it crashes even on Windows Chrome:

You should as well avoid specifying the version directive as the engine will insert it for you if needed.

My device should support it(gtx 1060), the same shader code in local typescript project will not crash on webgl2 mode and there is no error in console.

But with PG, the console has this line: “Babylon.js v4.1.0-beta.15 - WebGL1 - Parallel shader compilation” is this means that babylon is in webgl1 mode?

I have never seen this one, for me I can see

in your PG.

That’s strange and i’ll check my broswer for this.
Discard these error, do you think there are any steps we did wrong in that PG ?

Now I’ve got the PG reproduce the same problem and i think i’ve found where goes wrong :
you can have a try on mac(my device is MBP 13 2019 with intel iris plus 655)

My final shader merge the two framebuffer together and the result is like this:

only the left side is displayed.

if i make the multisample count to 1(it is 4 in the PG link), then the rendering result is right:

both sides are displayed.

Do you still see:

? If yes it won’t work, MRT is WebGL2 specific feature (well, I think there’s an extension for WebGL1 but your browser/Babylon may not support it).

Whenever i open PG in chrome on windows, the compiler is aways WebGL1, and in mac is aways WebGL2. But my local projects compiler on windows is WebGL2.

@Chao_Xu the problem is way worst than expected and I would advise you to contact the Chrome team for it as for me it makes my Mac reboot …