Yes, it does render.
I’m experimenting with different blend types and seems like “Premultiplied Alpha” solves the issue for 3D renderer, but not the text
Each layer has a unique ID, and each layer can be added in the list twice, one time to render opaque objects, one time to render transparent objects.
Have a look at subLayerList array on the same objects as layerList, True means transparent objects are rendered, and false means opaque.
I agree this is not ideal set up to understand, and there is also another array with enabled flags called subLayerEnabled. I was looking at replacing this by a single array of objects, but did get to that yet.
But how do I actually change the existing (default) order? I’m not trying to add new layer, just want to change the order
This is default:
And I need UI to come right after Skybox
const uilayer = pc.app.scene.layers.getLayerByName("UI");
const cloned = Object.assign({}, uilayer);
pc.app.scene.layers.remove(uilayer);
const SkyboxLayer = pc.app.scene.layers.getLayerByName("Skybox");
const idx = pc.app.scene.layers.getOpaqueIndex(SkyboxLayer);
pc.app.scene.layers.insert(cloned, idx + 1);
Uncaught TypeError: e.addMeshInstances is not a function
Even if I managed to clone or recreate original “UI” I’d still need to re-add layers for each entity that was using “UI” or it would automatically re-apply?