Godot version
4.0.beta17
System information
macOS 13.2
Issue description
The Transparent BG setting on SubViewport makes the background portions transparent in the resulting ViewportTexture as you can see in this example using the Mobile renderer:

However, if you switch to the Compatibility renderer it no longer makes the background transparent.

The issue here seems to be related to the environment, and more specifically background sky rendering. While the background sky is ignored in the Mobile and Forward+ renderer, it seems the background sky is rendered as opaque in the Compatibility renderer. If you remove the WorldEnvironment in the SubViewport (or just remove the sky background) you can see that the viewport correctly renders the background transparent again.

While I don't think it's related to the background transparency I'm also getting this error each time I run this minimum reproduction project, regardless or renderer:
E 0:00:00:0786 setup_local_to_scene: Condition "proxy.is_valid()" is true.
<C++ Source> scene/main/viewport.cpp:88 @ setup_local_to_scene()
Steps to reproduce
- Set up a SubViewport with a camera, a default WorldEnvironment, some mesh (to render something)
- Turn on Transparent BG on the SubViewport to make the background transparent
- Set up a UI scene with a TextureRect to render the ViewportTexture of the SubViewport
- Observe that the background is transparent on Mobile and Forward+ rendrerers
- Switch to Compatibility renderer
- Observe that the default sky is now rendered in the viewport background, and the background is not transparent.
Minimal reproduction project
viewport_background_test.zip
Godot version
4.0.beta17
System information
macOS 13.2
Issue description
The Transparent BG setting on SubViewport makes the background portions transparent in the resulting ViewportTexture as you can see in this example using the Mobile renderer:
However, if you switch to the Compatibility renderer it no longer makes the background transparent.
The issue here seems to be related to the environment, and more specifically background sky rendering. While the background sky is ignored in the Mobile and Forward+ renderer, it seems the background sky is rendered as opaque in the Compatibility renderer. If you remove the WorldEnvironment in the SubViewport (or just remove the sky background) you can see that the viewport correctly renders the background transparent again.
While I don't think it's related to the background transparency I'm also getting this error each time I run this minimum reproduction project, regardless or renderer:
Steps to reproduce
Minimal reproduction project
viewport_background_test.zip