Hi. I'm working on a HDR workflow using the auto exposure parameter of the post effects. This allows an reproduction of the eye mechanism when going from full sunlight to darker environment like the inside of a house or the night. It also give a lot of realism with lit objects and shadowy area rendering bright or dark depending on where the player stand: for example, insides of a house are dark seen from outside. Though I have an issue with the fog. My HDR skybox and sun are very powerful in order to take advantage of the different range of light intensities and as a result, Unity's fog is dark in daylight because it is not a HDR Color and can't follow. Here is an example of what the fog looks like event though it is pure white. Is there any way to change that? Or does anybody know an asset on the store solving that issue? Thanks.
Hey! It is not possible to use HDR ranges for fog in the built-in render pipeline. However, the HD render pipeline offers additional fog options within its Scene Settings game object, which tonemap nicely when using HDR lights.
Hey Marc, we had the same issue... it's frustrating that you can't have brighter fog in order to match, say, misty mornings where the early morning sun creates very brightly lit 'fog'. What we did was write custom fog functions for our shader. There's the 'Final Color' option if you're using surface shaders, otherwise just wrote from scratch our fog function still taking colour and mode (Exp2, Linear) from Unity.
Hi kristijonas_unity. Is the HD render pipeline VR compatible? As far as I know it is not but I don't know if it's too heavy or if it not supported at all.
Hi MattVLSG. I found a solution using Aura and adding some fog in the sunlight. It gives a convicing lit fog. Not perfect for every situations but did the job this time. I'm not sure what shader you are refering to. Is it something available on the asset store?
Hey, No it was just custom shaders for our project. So if you were using Surface Shaders, you add a final colour hook, there's a 'Fog' example here. https://docs.unity3d.com/Manual/SL-SurfaceShaderExamples.html Which is where we wrote our own fog function... which doubled the fog colour, so at least white will be extremely bright. And we used the Fog Color alpha to control how much of the sun colour comes through. Extreme example below, it's greenish fog but the sun is coming through to the left. Also wrote a custom skycube shader to have fog, as the default Unity one doesn't actually fog the skydome it appears! This is important if you want the fog to nicely blend out from world objects into the sky. We added a height value for the cubemap