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

OpenGL: Depth fog renders incorrectly in 4.4.dev #97875

Closed
goodbyesquare opened this issue Oct 6, 2024 · 5 comments · Fixed by #98327
Closed

OpenGL: Depth fog renders incorrectly in 4.4.dev #97875

goodbyesquare opened this issue Oct 6, 2024 · 5 comments · Fixed by #98327

Comments

@goodbyesquare
Copy link

Tested versions

  • Reproducible in Godot 4.4 dev 2 and 4.4 dev 3.
  • Not reproducible in Godot 4.3.

System information

Windows 11, RTX 4080, i9-13900k, Compatibility Renderer

Issue description

There is a rendering issue with Depth fog that creates a band effect in a circular radius around the camera at certain distances. If the material is textured then it corrupts the texture within the band area. This only affects the compatibility renderer, it doesn't seem to appear in the Forward and Mobile renderers from what I've tested and it doesn't seem to occur in Godot 4.3, just the 4.4 dev versions so I'm guessing some kind of regression happened? It appears in both the editor and in game. I'm honestly surprised nobody else has noticed and reported it as it's extremely obvious.
DepthFogRenderIssue

Steps to reproduce

Create a world environment and use depth fog at a specified distance eg. Depth start 50m, Depth end 200m and move the camera around until the halo effect appears.

Minimal reproduction project (MRP)

DepthFogRenderBug.zip

@SourceOfHTML
Copy link
Contributor

Still reproduceable on the latest as of now build (v4.4.dev.custom_build [842f982]), and messing with the numbers makes me think that this is more closely tied to depth_begin, since that more directly affects the band.

The closer depth_end is to depth_begin, the more the band is blurred, which I'm assuming is perfectly normal behavior.

I reckon this was the result of a dev debugging some other issue and forgetting to delete some debugging lines.

@Calinou Calinou added this to the 4.4 milestone Oct 10, 2024
@Calinou Calinou changed the title Depth Fog Render Issue OpenGL: Depth fog renders incorrectly in 4.4.dev Oct 10, 2024
@SourceOfHTML
Copy link
Contributor

I don't trust myself enough with rendering to continue on this, apologies. Another, more experienced dev will have to take over.

@matheusmdx
Copy link
Contributor

Bisecting points to #96413 as the culprit, @Maran23

image

@clayjohn
Copy link
Member

Looks like we need to revert #96413 and try again :( Drivers are so finicky.

@clayjohn
Copy link
Member

This is the same underlying problem as #96943

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.

5 participants