Add fixed fog to the sky in the Compatibility renderer#95662
Conversation
There was a problem hiding this comment.
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.
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
|
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