I have an editor app where 2 cameras set up like this:
The idea is to have 2 viewports, one for the UI and one for a smaller editor window: this window is still rendered using the same context and canvas, but it has its own camera with its own viewport.
You can look at this screenshot from Apple’s “Motion” app to get an idea: it has a viewport with black background, and someoverlaying UI elements (3d gizmo in the bottom left corner, buttons).
Is it possible to set the clear color for each camera separately? I guess they only way to do that would be to have 2 separate scenes, each having its own camera, viewport, and issuing 2 draw calls in the render loop?