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: Fog color is incorrect if one of the components is exactly 0 #66459

Closed
Tracked by #69579 ...
Calinou opened this issue Sep 26, 2022 · 0 comments · Fixed by #72914
Closed
Tracked by #69579 ...

OpenGL: Fog color is incorrect if one of the components is exactly 0 #66459

Calinou opened this issue Sep 26, 2022 · 0 comments · Fixed by #72914

Comments

@Calinou
Copy link
Member

Calinou commented Sep 26, 2022

Related to #66456 and #66462.

Godot version

4.0.beta (53d2a9a)

System information

Fedora 36, GeForce GTX 1080 (NVIDIA 515.65.01)

Issue description

Notice how the fog color suddenly changes as I hit 0 on the red, green and blue channels respectively:

out.mp4

This doesn't occur when using the Vulkan Clustered renderer. This hints at a division by zero or NaN being produced by the shader, as fog rendering gets strange colors in general. You can notice a black stripe in the sky which is only visible when fog is enabled, despite #66456.

Steps to reproduce

  • Switch to the OpenGL driver in the Project Settings.
    • Make sure to start the editor with single-window mode enabled afterwards. This can be done by enabling Single Window Mode in the Editor Settings before changing the driver, or by opening the project in the editor directly with the --single-window command line argument.
  • Add a WorldEnvironment node, a Camera3D node and a MeshInstance3D in front of the camera.
  • Enable fog. Change the color using the color picker slowly towards pure black, by adjusting each channel individually with the sliders.

Minimal reproduction project

test_opengl_fog_sky_affect.zip

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