Far/Distant fog in my endless runner game

Hi guys,

I’m working on my first iPhone/iPad game. It will be endless runner game for iPhone/iPad.
I need your comments about distant for in the game. I’ve read that it’s better to use a set of planes with transparency shader for achieve such a result. So, I tried to do it. Please, take a look at the attached image for better understand.

So, I need your help about how to get such a smooth looking result like in the samples I sent you (Temple Run and Subway Surfers)?
Just to use more planes? Is it the solution? Also did I do right while chose Transparency shader for the planes? I didn’t find a mobile transparency shader in the standard shaders list.

Also I wonder how the guys from Subway Surfers achieve such a cool looking bending view from the camera? It look like some kind of camera lens distortion.

So, thank you for your time and your help.

Planes probably are not the right solution. You will get loads of overdraw which would kill performance on mobile. Plus you will need lots of planes to get a smooth effect.

Its better to use either Unity’s built in fog or use custom shaders that work out the distance a vertex is away from the camera and then apply a fog colour.

Thanks ddeaco for your reply!

I’ve found this recommendation from ShadowGun creators about fog:
Fog effects - avoided.
Single planes that fade in and out are used to achieve cinematic fog effects without actually rendering any fog.
This is faster because the planes are few and far between, and it means that fog doesn’t have to be calculated on every pixel and in every shader.

Original articles here: http://docs.unity3d.com/Documentation/Manual/iphone-OptimizedGraphicsMethods.html

But maybe you are right, I have to check what will work better in my case.

Read this article carefully: http://blogs.unity3d.com/2012/03/23/shadowgun-optimizing-for-mobile-sample-level/
And download Shadowgun sample level and saw, that they create some different fog into that scene. Will try to check what build in fog give me.

And what about camera distortion effect in Subway Surfers, guys? Any ideas?

Again done in the vertex shader, I’m sure ive seen someone post a shader with the same effect.

OK. Thank you.