-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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: Environment fog does not affect sky rendering #66456
Comments
I've been looking into fixing up some of the GLES fog issues because of the fog_sky_affect issue. There are some uniforms in the sky shader but they ain't exactly hooked up to the rendering backend properly. I wanted to pick your brain @Calinou and @clayjohn about what approach the Godot team would like here. Should we pack those guys in a UBO SkySceneData (name in shader) with a struct SkySceneState (mirrored storage on host) to make it more like the Vulkan renderer? Then we would update values in the UBO from RendererEnvironmentStorage in void RasterizerSceneGLES3::_setup_sky. Or should we stick to setting individual uniforms and avoid making a new UBO? |
@ParsleighScumble Either approach is fine. Initially I went with the individual uniforms for small things that change frequently, but once you have more than one or two uniforms, it becomes just as fast to pack everything into a UBO that you update every frame. |
Let's go with a UBO, then. I should have fog sky affect working in GLES pretty soon. |
I can still reproduce this on 4.3.dev 13a0d6e. @ParsleighScumble Did you get it working in the end? If so, please open a pull request 🙂 |
I did get it working but it's a bit of a mess and I didn't get tonemapping working for all background modes. I can post what I have though. |
Please do 🙂 |
Yes, fog should affect sky rendering to the extent set by the Environment Fog Sky Affect property. That property defaults to 1.0, which means the sky color should match the fog color according to the Camera3D's Z far property (the sky is assumed to be at the same depth as Z far). |
Godot version
4.0.beta (53d2a9a)
System information
Fedora 36, GeForce GTX 1080 (NVIDIA 515.65.01)
Issue description
Unlike in Vulkan, environment fog does not affect sky rendering when using the OpenGL renderer. Fog Sky Affect's value is ignored.
Fog disabled
Fog enabled
Steps to reproduce
--single-window
command line argument.Minimal reproduction project
test_opengl_fog_sky_affect.zip
The text was updated successfully, but these errors were encountered: