Unity Shader Graph Fog node shows density inverted when using Linear Fog. Also not properly showing the color of the fog on far objects.
Seems we are missing one step in the fog calculation. This custom node fix the issue.
Custom node body:
fogIntensity = 0;
#if defined(FOG_EXP)
fogIntensity = 1 - saturate(exp2(-fogFactor));
#elif defined(FOG_EXP2)
fogIntensity = 1 - saturate(exp2(-fogFactor * fogFactor));
#elif defined(FOG_LINEAR)
fogIntensity = 1 - fogFactor;
#endif
Custom node Settings:
Custom node usage:
Results: