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

Fog obscures unshaded materials in GLES2, also affects Gizmos. #26235

Closed
EzraT opened this issue Feb 24, 2019 · 9 comments · Fixed by #29141
Closed

Fog obscures unshaded materials in GLES2, also affects Gizmos. #26235

EzraT opened this issue Feb 24, 2019 · 9 comments · Fixed by #29141

Comments

@EzraT
Copy link

EzraT commented Feb 24, 2019

Godot version:
Godot_v3.1-beta7
Also tested in 3.1-RC1, still present.

OS/device including version:
Linux Mint 19.1
NVIDIA GP106 [GeForce GTX 1060 6GB], Driver version: 415.27

Issue description:

As the title says, unshaded objects get obscured by fog in GLES2.
I'm not sure what the correct behaviour is here, but the GLES3 backend always renders unshaded meshes the same way, whether fog is enabled in the scene or not.

Steps to reproduce:

  1. Switch to GLES2.
  2. Enable fog in WorldEnvironment node.
  3. Add a MeshInstance with an unshaded material to the scene.
  4. View the mesh from a greater distance by zooming out.
  5. Compare to GLES3.

Screenshots:
GLES3:
gles3

GLES2:
gles2

@EzraT
Copy link
Author

EzraT commented Mar 11, 2019

This same problem also happens to Gizmo's, I'm guessing they use the same unshaded render mode. (?)
Look at the camera gizmo turning dark when zooming out:

02

@EzraT EzraT changed the title Fog obscures unshaded meshes in GLES2. Fog obscures unshaded materials in GLES2, also affects Gizmos. Mar 11, 2019
@akien-mga akien-mga added this to the 3.2 milestone May 24, 2019
@EzraT
Copy link
Author

EzraT commented Aug 24, 2019

@akien-mga Can this issue be re-opened? This still affects editor gizmo's in GLES2:
blackgizmos

They turn black when fog is enabled, even when the fog color is set to something different than black.
This happens in the official 3.1 build.

@clayjohn
Copy link
Member

Could be related to #31019

Can you rebuild from master but delete the ".gen.h" files from drivers/gles2/shaders first?

@clayjohn clayjohn reopened this Aug 24, 2019
@EzraT
Copy link
Author

EzraT commented Aug 24, 2019

I'm not using a self compiled build of Godot at the moment, but I will re-test this as you described.

@akien-mga
Copy link
Member

I'm not using a self compiled build of Godot at the moment, but I will re-test this as you described.

What version are you using then? This issue was fixed in the master branch in May, the fix is not in any stable release yet.

@akien-mga
Copy link
Member

akien-mga commented Aug 24, 2019

I see you added

This happens in the official 3.1 build.

So it's normal, this was fixed in master, and cherry-picked for 3.1.2. The issue's milestone tells you which main branch will include the fix (3.2).

@EzraT
Copy link
Author

EzraT commented Aug 24, 2019

Ah, good to know, thank you for clarifying @akien-mga.

@the-sink
Copy link
Contributor

the-sink commented Sep 19, 2023

Not sure if I should open a new issue since this one is so old, but the problem of the 3D editor selection gizmo being obscured by fog has resurfaced (at least as of 4.0, and still appears on the latest commit in the master branch):

Godot_v4.1.1-stable_win64_2023-09-19_13-00-51.mp4

Also affected by volumetric fog:

image

Edit: This is on Forward+, however it seems to occur on Mobile and Compatibility as well.

@Calinou
Copy link
Member

Calinou commented Sep 19, 2023

This is a known issue, which is already tracked in godotengine/godot-proposals#2138.

That said, now that #81286 is merged, we can use the disable_fog render mode for gizmo materials (lines, handles, icons).

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

Successfully merging a pull request may close this issue.

7 participants