Render only advancedTexture layer

Hi everybody from BabylonJS team and friends of the community!

For performance reason, I am looking for a way to render only the GUI advancedTexture layer but my first tests are not working:

I am pretty sure this is doable but I haven’t find the right way yet :wink:

Well an easy way is to have the GUI in a second scene and then only render that scene in your renderloop

Yep it works with the second scene.

But it seems to be not compatible with the linkWithMesh function?
Or I would need to 2 exact same objects in each scene and make sure they are always matching.

Is there no way to render a layer separately from the others?
Thanks :wink:

RendergroupId is then the way to go:)

Hi. If you want place layer on second scene you can create copy of your main camera and update parameters from your main camera in loop like onBeforeRender
or you can place on second scene only simple meshes like planes with coordinates of your main meshes. You don’t need same objects only transform node. I use second variant because sometimes mesh pivots placed not in ideal for my marker position and i can simply place my marker center in other place not only in hipoly mesh transform center.
But i see other problem with linkwithMesh its poor performance. I detach invisible markers from mesh and attach only visible. It’s partially solve problem.
Its not optimized version of markers but i do it for stress test. In final solution i use useBitmapCache = true for static gui elements but anyway tooo slow.