-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
Add fixed fog to the sky in the Compatibility renderer #95662
Conversation
@@ -777,7 +777,6 @@ void RasterizerSceneGLES3::_draw_sky(RID p_env, const Projection &p_projection, | |||
ERR_FAIL_COND(p_env.is_null()); | |||
|
|||
Sky *sky = sky_owner.get_or_null(environment_get_sky(p_env)); | |||
ERR_FAIL_NULL(sky); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When doing a custom sky pass for fog we can continue without the sky. This is used when you have fog, but are using a custom color background.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally with #66456 MRP, it mostly works as expected. There seems to be a sRGB/linear color conversion issue though:
Forward+ | Mobile | Compatibility |
---|---|---|
![]() |
![]() |
![]() |
With tonemapping set to Linear in the MRP:
Forward+ | Mobile | Compatibility |
---|---|---|
![]() |
![]() |
![]() |
With tonemapping set to Linear in the MRP and fog density set to 1 (so you can compare the actual fog color):
Forward+ | Mobile | Compatibility |
---|---|---|
![]() |
![]() |
![]() |
Sky colors with Linear tonemapping:
Forward+ | Mobile | Compatibility |
---|---|---|
#858c9c |
#b5c1d3 |
#3b4354 |
The Mobile rendering method has a similar issue, but the sky color is too bright instead of being too dark.
@Calinou Oh! good catch there, I was testing with white fog, so it looked the same in all backends to me. I think I know what is wrong in the mobile backend, the code looked a little funny to me, but I left it alone as it was out of scope. I can probably do a quick fix for both |
And apply luminance multiplier after fog in RD renderer
7600d3c
to
578049b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! |
Cherry-picked for 4.3.1. |
Fixes: #66456
The entire implementation was missing. Some of the infrastructure was already there and just needed to be plugged in and finished