Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WorldEnvironment makes adjustments to editor dropdowns and dialogs if background mode is set to Canvas #69122

Closed
ItsDaBenji opened this issue Nov 24, 2022 · 5 comments · Fixed by #72343

Comments

@ItsDaBenji
Copy link

ItsDaBenji commented Nov 24, 2022


Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.


Godot version

4.0-beta6

System information

Windows 10, mobile renderer

Issue description

When messing with the world environment node in 2D, I was adding some bloom effect to my game, and the editor itself now has bloom
image
image
image

Steps to reproduce

Create a 2D scene
Add a world environment node
Set the Background mode to "Canvas"
Enable "Glow"
Increase both the "Strength" and "Blend" values
For best results, set "Blend mode" to "Replace"
Open up any sub menu (I discovered this by clicking to change the Blend Mode again, but the project settings is also effected by the post processing)

Minimal reproduction project

2DPostProcessingErrorProject.zip

@Calinou
Copy link
Member

Calinou commented Nov 24, 2022

Related to #52467.

@snougo
Copy link

snougo commented Nov 25, 2022

I can reproduce issue in Godot4 beta6 on Mac

@Calinou Calinou changed the title World environment node makes adjustments to the editor WorldEnvironment makes adjustments to the editor if background mode is set to Canvas Dec 2, 2022
@Calinou Calinou changed the title WorldEnvironment makes adjustments to the editor if background mode is set to Canvas WorldEnvironment makes adjustments to editor dropdowns and dialogs if background mode is set to Canvas Dec 2, 2022
@clayjohn clayjohn self-assigned this Jan 3, 2023
@clayjohn
Copy link
Member

clayjohn commented Jan 4, 2023

This issue is deceptively tricky and may require quite a bit of work to fix.

Primarily it comes from how we handle editor drawing.

  1. The environment from the user's scene is also applied to the root Viewport (i.e. the editor itself)
  2. We instruct the root Viewport to ignore the environment by setting the disable_environment flag
  3. In Godot 4.x, we have popup Windows which are independent from the root (or at least, have their own Viewport)

Unfortunately, the disable_environment flag does not carry over to child Viewports so the popup windows use the environment even though they shouldn't.

I'm not sure what an ideal fix would look like. On the one hand, we can probably make child Viewports inherit the disable_environment flag from their parents, but that may not be useful and may cause its own problems.

We can't simply have the child inherit the settings of its parent as it is registered with the parent each time it is made visible. So if the child has settings of its own, they would be lost once it was made visible.

edit: One option that works, but is a total pain is to manually disable the environment for each editor popup clayjohn@a2ba315 I tested it out here. This commit fixes the issue for all of the top-level popups. But it would need to be done for every editor class to close this issue. We need to find a better way

@clayjohn clayjohn modified the milestones: 4.0, 4.x Jan 4, 2023
@sandmuel
Copy link

Had same issue, came to see if it was already reported, guess this answers my question. :)

@2fd5
Copy link

2fd5 commented Jan 25, 2023

Still can reproduce with Godot 4.0.beta15 on Macbook Air M1 running macOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment