So, there is one thing that i don't quite understand. (Probably because i didn't dive that deep into PBR lighting in the first place.)
Currently, i implemented a very basic PBR renderer (with the BRDF microfaced shading model) into my engine. The lighting system i have is pretty basic (1 directional/sun light, deffered point lights and 1 ambient light)
I don't have a GI solution yet. (Only a very basic world-space Ambient occlusion technique).
Here is how it looks like:
Now, what i would like to do is to give the shadows a slightly blueish tint. (To simulate the blueish light from the sky.)
Unreal seems to implement this too which gives the scene a much more natural look:
Now, my renderer does render in HDR and i use exposure/tonemapping to bring this down to LDR.
The first image used an indirect light with a RGB value of (40,40,40) and an indirect light of (15,15,15).
Here is the same picture but with an ambient light of (15,15,15) * ((109, 162, 255) / (255,255,255)) which should give us this blueish tint.
The problem is it looks like this:
The shadows do get the desired color (more or less) the issue is that all lit pixels also get affected giving the scene a blue tint.
Reducing the ambient light intensity results in way too dark shadows. Increase the intensity and the shadows look alright but then the whole scene gets affected way too much.
In the shader i basically have:
color = directionalLightColor * max(dot(normal,sunNormal),0.0) + ambientLight;
The result is that the blue component of the color will be always higher than the other two.
I could of course fix it by faking it (only adding the ambient light if the pixel is in shadow) but i want to stay as close to PBR as possible and avoid adding hacks like that.
My question is: How is this effect done properly (with PBR / proper physically based lighting)?