Below are some screenshots from Zinga’s Mountain Goat Mountain.
It seems like there is certain sphere shaped range and outside of this range is foggy.
Anyone knows how to make this kind of foggy?
Below are some screenshots from Zinga’s Mountain Goat Mountain.
It seems like there is certain sphere shaped range and outside of this range is foggy.
Anyone knows how to make this kind of foggy?
I was playing with Skybox and Fog option at Lighting/Scene window. But seems like it’s not what I want. Foggy range is too wide and I want to focus on to my character to be shown clear.
You should be able to tweak the Unity fog quite a bit, but if you can’t get what you want then you can create a surface shader with a “finalcolor” pragma to alter the color after the shading has been applied. Adding “screenPos” to the input structure should give you depth (in screenPos.z), and you can add any type of fog to your shader that you can express as a mathematical function.
Check out the example surface shaders here and look for “finalcolor”.
You could also do this as a image effect looking at the depth texture, but it would be more efficient to add the fog calculation to the shaders you are using than adding a whole other pass of the screen just for the fog.