- Home /
Question by
yaakovyitzchakbenmoshe · Jun 18, 2021 at 03:00 AM ·
fog
Fog clipping how to
B"H
This would seem rather simple but I'm trying to do fog in unity to cut out the distance items, and

Settings (from Javascript but same idea, left commented out portions for context, Achdus is part of the library, main point is the clipping plane)
UnityEngine.RenderSettings.fog = true
//UnityEngine.RenderSettings.fogMode = UnityEngine.FogMode.Linear
UnityEngine.RenderSettings.fogColor = new UnityEngine.Color(0.2,0.2,0.2)
UnityEngine.RenderSettings.fogMode = UnityEngine.FogMode.ExponentialSquared
//UnityEngine.RenderSettings.fogMode = UnityEngine.FogMode.Exponential
UnityEngine.RenderSettings.fogStartDistance = 40
UnityEngine.RenderSettings.fogEndDistance = 79
UnityEngine.RenderSettings.fogDensity = .05
UnityEngine.Camera.main.farClipPlane =
Achdus.Yaakov.mainCoby.shneeuh.farClipPlan = 120
It would seem like it should be a simple feature to cut out the fog in the distance?
Tried using kinofog but I got these errors (after applying cubemap texture to camera)

How can I clip out distant objects such that the clipping isn't so sharp, and the intensity of the fog isn't cutting it out?
Comment
Your answer