Curve/Bend Global fog

Any information on how to bend a global fog in a shape of parabola , because I use a shader which bends the world , but global fog goes straight ?

If you look at the GlobalFog.shader file, you’ll see the functions fairly well-commented.

  • Distance-based fog is calculated in the pixel shader by calling ComputeDistance(). This method returns a float based on the length of the world space vector from the camera towards the screen pixel (if using radial distance), or just the simple depth of the pixel if not using radial distance.

  • Height-based fog is calculated in linear half-space, using the technique described at https://www.terathon.com/lengyel/Lengyel-UnifiedFog.pdf. The value of note here is _HeightParams.y, which is F · C - the difference between the camera height and the fog height. To create a parabolic fog line, you’ll need to adjust this value to account for the absolute difference in the x axis between the pixel being rendered and the camera’s x position (in the camera’s local space).

You can define curves using AnimationCurve class.
Once you make the curve look what you like, at any time call theCurve.Evaluate(point) to get the value.