Been visiting this place many times getting a lot of questions answered. However this time I would need to create a topic myself
In the application I’m working we are using threejs as a 2D engine (unfortuate, I know). This is done by using an orthographic camera with only panning and zooming available with static entities.
Visually the application is pure 2D and hence I would need to get the rendering to work like that as well. In short I would need to have a specific render order of groups despite the children’s distance to the camera. Basically like you expect a 2D engine/layers to work.
My first initial idea was to have multiple render passes, one for each “layer”. However I cannot create separate scenes at this time due to heavy complexity.
After a lot of research and trying out I think the best way to do this is by assigning
renderOrder to the groups I want to sort and have all materials instanced with
My questions are therefore:
- Would you consider this to be the “best” possible solution?
- If so, is it possible to set
depthTest: falseon a global level instead of doing it on every material instance? (as we have a lot of them)
I’ve been digging around the source code with no success.
Looking forward to solve this quirky thing
Thanks in advance