in the docs at https://docs.godotengine.org/en/stable/tutorials/rendering/viewports.html#cameras-2d-3d
"CameraA will display on the Root Viewport and it will draw MeshA. CameraB will be captured by the SubViewport along with MeshB. Even though MeshB is in the scene hierarchy, it will still not be drawn to the Root Viewport. Similarly, MeshA will not be visible from the SubViewport because SubViewports only capture nodes below them in the hierarchy."
When i make the same setup as in the docs, both meshes are visible with both cameras (if i do not set render layers and cull masks - which can be tricky and seems to not even be possible for the editor viewport).
That camera b can see what is above it's viewport is necessary, as otherwise rendering to a subviewports would be kind of meaningless (e.g needed for post processing shaders as a buffer replacement). The other way round i am not sure ... and both contradict the docs. I am not sure what is wrong, the way subviewports behave or the docs.
Tested versions
System information
Godot v4.2.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 Laptop GPU (NVIDIA; 31.0.15.5161) - AMD Ryzen 7 5800H with Radeon Graphics (16 Threads)
Issue description
in the docs at https://docs.godotengine.org/en/stable/tutorials/rendering/viewports.html#cameras-2d-3d "CameraA will display on the Root Viewport and it will draw MeshA. CameraB will be captured by the SubViewport along with MeshB. Even though MeshB is in the scene hierarchy, it will still not be drawn to the Root Viewport. Similarly, MeshA will not be visible from the SubViewport because SubViewports only capture nodes below them in the hierarchy."
When i make the same setup as in the docs, both meshes are visible with both cameras (if i do not set render layers and cull masks - which can be tricky and seems to not even be possible for the editor viewport). That camera b can see what is above it's viewport is necessary, as otherwise rendering to a subviewports would be kind of meaningless (e.g needed for post processing shaders as a buffer replacement). The other way round i am not sure ... and both contradict the docs. I am not sure what is wrong, the way subviewports behave or the docs.
Steps to reproduce
Copy the setup from the docs (screenshot above).
Minimal reproduction project (MRP)
bug.zip