That can be done as we have a general render to texture method but you do lose input and can costly in VRAM usage.
The other thing that could be done is have it on a layer above the world with a manual sorting logic setting and have a script that sets the render order on the elements based on the hierarchy. I wonder if the screen component in world space does that for you
So as I understand it, because enabling postprocessing causes the world to be drawn to a texture its losing the depth when being written back to the screen. What I’ve got so far is I’ve got the depth texture of the world in the post process shader and I’m writing it back to the screen via gl_FragDepth. This unfortunately hasn’t made a difference yet, what else do I need to do to restore the old functionality?
Its the same issue as everyone else is experiencing. as soon as you use post effects (e.g. bloom) depth rendering breaks on ui layer, changing the layer back to world just introduces more issues (z fighting).
Unfortunately that has the other issue that I mentioned layers bug disappearing text - PLAYCANVAS
If you rotate the texture the text disappears. An issue that doesn’t occur when using it on the UI layer without bloom
Unfortunately it turns out this fix doesn’t work, even without bloom z-ordering with 3d ui elements doesn’t work correctly and depends on order of insertion. Setting them all to the world layer introduces new issues. After some digging I’ve discovered that its because the materials have depthWrite set to false. Is there a public way to update the material of a text element because this is not great but it does appear to allow correct depth sampling on the ui elements
Thanks mate. using the above code doesn’t work directly as the change seems to get overwritten somehow (wrapping it in a setTimeout proves this). Its obviously a private api so fair enough, look forward to a correct way.
Better still would be for 3d ui elements to work out of the box without having to mess with the layers + materials. Feels to me it should only be treated differently when part of a screen element, otherwise it feels completely inconsistent with other scene objects