godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.46k stars 20.25k forks source link

SSR causes opaque meshes inside a subviewport with transparent bg to get invisible #73817

Open Rytelier opened 1 year ago

Rytelier commented 1 year ago

Godot version

4.0 RC3

System information

Windows 10, Vulkan

Issue description

Enabling SSR in the environment causes opaque objects placed inside subviewport with transparent backround enabled disappear, they are not being rendered.

Steps to reproduce

Minimal reproduction project

Subviewport transparent bg.zip

cwook commented 12 months ago

This bug also affects Depth of Field. Tested on v4.1.1.stable.official [bd6af8e0e] Made an example project testing both SSR and DOF: SubViewportBug.zip

clayjohn commented 10 months ago

Unfortunately, I think the best solution here is to disallow using SSR and SSS when using a transparent bg as we did in Godot 3.

TopYTgit commented 7 months ago

any progress on this issue? It still is an issue in the engine as of 2/3/24

jamie-pate commented 3 months ago

any progress on this issue? It still is an issue in the engine as of 2/3/24

It sounds like the solution will be to disable this feature in subviewports.

A workaround is to duplicate your current environment, but disable these features and attach that environment to the camera inside your subviewport. (I just got bit by this too, and it sucked up a bunch of time trying to figure out why this was happening)

Still present in godot 4.2.2 and 4.3-beta.1

tetrapod00 commented 1 week ago

Unfortunately, I think the best solution here is to disallow using SSR and SSS when using a transparent bg as we did in Godot 3.

How would this work, technically? If you have SSR on the main environment, and a subviewport with a transparent bg that implicitly uses that main environment, would the subviewport silently disable SSR on its environment? Or would you manually have to create a second environment on the subviewport? Would a configuration warning, or some other warning (toast, push warning) be useful here?